Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -163,6 +163,9 @@ def respond(
|
|
163 |
client_llama = InferenceClient("meta-llama/Meta-Llama-3-8B-Instruct")
|
164 |
generate_kwargs = dict( max_new_tokens=2000, do_sample=True, stream=True, details=True, return_full_text=False )
|
165 |
|
|
|
|
|
|
|
166 |
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> [USER] {message} {vqa}'})
|
167 |
|
168 |
response = client.chat_completion( messages, max_tokens=150)
|
|
|
163 |
client_llama = InferenceClient("meta-llama/Meta-Llama-3-8B-Instruct")
|
164 |
generate_kwargs = dict( max_new_tokens=2000, do_sample=True, stream=True, details=True, return_full_text=False )
|
165 |
|
166 |
+
for qas in history:
|
167 |
+
messages.append({"role": "user", "content": f"{str(msg[0])}"})
|
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> [USER] {message} {vqa}'})
|
170 |
|
171 |
response = client.chat_completion( messages, max_tokens=150)
|