Spaces:
Building
Building
Update app.py
Browse files
app.py
CHANGED
@@ -79,7 +79,7 @@ def respond(message, history):
|
|
79 |
message_text = message["text"]
|
80 |
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> [USER] {message} {vqa}'})
|
81 |
|
82 |
-
response = client_gemma.chat_completion(
|
83 |
response = str(response)
|
84 |
try:
|
85 |
response = response[int(response.find("{")):int(response.index("</"))]
|
|
|
79 |
message_text = message["text"]
|
80 |
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> [USER] {message} {vqa}'})
|
81 |
|
82 |
+
response = client_gemma.chat_completion(func_caller, max_tokens=150)
|
83 |
response = str(response)
|
84 |
try:
|
85 |
response = response[int(response.find("{")):int(response.index("</"))]
|