Update functions/chat_functions.py
Browse files
functions/chat_functions.py
CHANGED
@@ -38,7 +38,7 @@ def chatbot_with_fc(message, history):
|
|
38 |
while True:
|
39 |
# if OpenAI response is a tool call
|
40 |
if response and response["replies"][0].meta["finish_reason"] == "tool_calls":
|
41 |
-
function_calls = json.loads(response["replies"][0].
|
42 |
for function_call in function_calls:
|
43 |
## Parse function calling information
|
44 |
function_name = function_call["function"]["name"]
|
|
|
38 |
while True:
|
39 |
# if OpenAI response is a tool call
|
40 |
if response and response["replies"][0].meta["finish_reason"] == "tool_calls":
|
41 |
+
function_calls = json.loads(response["replies"][0].content)
|
42 |
for function_call in function_calls:
|
43 |
## Parse function calling information
|
44 |
function_name = function_call["function"]["name"]
|