KingNish commited on
Commit
d9c9b7c
·
verified ·
1 Parent(s): a1b0620

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -128,10 +128,6 @@ def respond(
128
  "type": "string",
129
  "description": "image generation prompt in detail.",
130
  },
131
- "number_of_image": {
132
- "type": "integer",
133
- "description": "number of images to generate.",
134
- }
135
  },
136
  "required": ["query"],
137
  },
@@ -166,7 +162,7 @@ def respond(
166
  for msg in history:
167
  question_history += f"{str(msg[0])}/n"
168
 
169
- messages.append({"role": "user", "content": f'[SYSTEM]You are a helpful assistant with access to the following functions: \n {str(functions_metadata)}\n\nTo use these functions respond with:\n<functioncall> {{ "name": "function_name", "arguments": {{ "arg_1": "value_1", "arg_1": "value_1", ... }} }} </functioncall> Choose functions wisely and Also reply wisely, reply with just functioncall only as tell you before, Make function while learning from Prev Questions But make sure to create query only for Current Question. [PREV_QUESTIONS] {question_history} [CURRENT_QUESTION] {message_text} {vqa}'})
170
 
171
  response = client.chat_completion( messages, max_tokens=150)
172
  response = str(response)
 
128
  "type": "string",
129
  "description": "image generation prompt in detail.",
130
  },
 
 
 
 
131
  },
132
  "required": ["query"],
133
  },
 
162
  for msg in history:
163
  question_history += f"{str(msg[0])}/n"
164
 
165
+ messages.append({"role": "user", "content": f'[SYSTEM]You are a helpful assistant with access to the following functions: \n {str(functions_metadata)}\n\nTo use these functions respond with:\n<functioncall> {{ "name": "function_name", "arguments": {{ "arg_1": "value_1", "arg_1": "value_1", ... }} }} </functioncall> Choose functions wisely and Also reply wisely, reply with just functioncall only as tell you before, Make function while learning from Prev Questions But make sure to create function call only for Current Question not for prev. [PREV_QUESTIONS] {question_history} [CURRENT_QUESTION] {message_text} '})
166
 
167
  response = client.chat_completion( messages, max_tokens=150)
168
  response = str(response)