Spaces:
Runtime error
Runtime error
Commit
·
73f0134
1
Parent(s):
0e854dc
Update gpt.py
Browse files
gpt.py
CHANGED
|
@@ -40,7 +40,7 @@ def get_keywords(question):
|
|
| 40 |
function_call={"name": "list_keywords", "arguments": ["list"]},
|
| 41 |
)
|
| 42 |
|
| 43 |
-
arguments = response.choices[0].
|
| 44 |
print(arguments)
|
| 45 |
return " ".join(arguments).split(" ")
|
| 46 |
|
|
@@ -91,7 +91,7 @@ Sur la base des informations ci-dessus, quelle est la réponse à cette question
|
|
| 91 |
)
|
| 92 |
|
| 93 |
try:
|
| 94 |
-
function_call = response
|
| 95 |
arguments = function_call["arguments"].lower()
|
| 96 |
result = json.loads(arguments)
|
| 97 |
return result
|
|
|
|
| 40 |
function_call={"name": "list_keywords", "arguments": ["list"]},
|
| 41 |
)
|
| 42 |
|
| 43 |
+
arguments = response.choices[0]["message"]["function_call"]["arguments"].lower()
|
| 44 |
print(arguments)
|
| 45 |
return " ".join(arguments).split(" ")
|
| 46 |
|
|
|
|
| 91 |
)
|
| 92 |
|
| 93 |
try:
|
| 94 |
+
function_call = response.choices[0]["message"]["function_call"]
|
| 95 |
arguments = function_call["arguments"].lower()
|
| 96 |
result = json.loads(arguments)
|
| 97 |
return result
|