Spaces:
Running
on
Zero
Running
on
Zero
Update chatbot.py
Browse files- chatbot.py +1 -1
chatbot.py
CHANGED
@@ -245,7 +245,7 @@ def model_inference( user_prompt, chat_history):
|
|
245 |
func_caller.append({"role": "assistant", "content": f"{str(msg[1])}"})
|
246 |
|
247 |
message_text = message["text"]
|
248 |
-
func_caller.append({"role": "user", "content": f'[SYSTEM]You are a helpful assistant. You have 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>
|
249 |
|
250 |
response = client_mistral.chat_completion(func_caller, max_tokens=200)
|
251 |
response = str(response)
|
|
|
245 |
func_caller.append({"role": "assistant", "content": f"{str(msg[1])}"})
|
246 |
|
247 |
message_text = message["text"]
|
248 |
+
func_caller.append({"role": "user", "content": f'[SYSTEM]You are a helpful assistant. You have 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> , Reply in JSOn format, you can call only one function at a time, So, choose functions wisely. [USER] {message_text}'})
|
249 |
|
250 |
response = client_mistral.chat_completion(func_caller, max_tokens=200)
|
251 |
response = str(response)
|