ysharma HF staff commited on
Commit
b3cb545
·
1 Parent(s): 873c73d

removed bug in function calling

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -80,7 +80,7 @@ tools = [
80
 
81
 
82
  # function calling
83
- def run_conversation(user_input, plugins, tools):
84
 
85
  print(f"Plugins are - {plugins}")
86
  print(f"Total available PLUGINS/Tools are - {tools}")
@@ -149,7 +149,7 @@ def predict(user_input, temperature, stable_diff, image_cap, top_news, google_se
149
 
150
  if function_call_decision:
151
  # getting openAI function agent reponse
152
- function_response, image_file = run_conversation(user_input, plugins, tools)
153
  if function_response is not None:
154
  gpt_response = AIMessage(content= function_response)
155
  bot_message = gpt_response.content
@@ -162,7 +162,7 @@ def predict(user_input, temperature, stable_diff, image_cap, top_news, google_se
162
 
163
  if function_call_decision:
164
  # getting openAI function agent reponse
165
- function_response, image_file = run_conversation(user_input, plugins, tools)
166
  if function_response is not None:
167
  gpt_response = AIMessage(content= function_response)
168
  bot_message = gpt_response.content
 
80
 
81
 
82
  # function calling
83
+ def run_conversation(user_input, plugins, tools, chat):
84
 
85
  print(f"Plugins are - {plugins}")
86
  print(f"Total available PLUGINS/Tools are - {tools}")
 
149
 
150
  if function_call_decision:
151
  # getting openAI function agent reponse
152
+ function_response, image_file = run_conversation(user_input, plugins, tools, chat)
153
  if function_response is not None:
154
  gpt_response = AIMessage(content= function_response)
155
  bot_message = gpt_response.content
 
162
 
163
  if function_call_decision:
164
  # getting openAI function agent reponse
165
+ function_response, image_file = run_conversation(user_input, plugins, tools, chat)
166
  if function_response is not None:
167
  gpt_response = AIMessage(content= function_response)
168
  bot_message = gpt_response.content