nolanzandi commited on
Commit
8cdf972
·
verified ·
1 Parent(s): 3be4b56

Update functions/chat_functions.py

Browse files
Files changed (1) hide show
  1. functions/chat_functions.py +1 -1
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].text)
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"]