Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -112,7 +112,7 @@ def run_conversation(user_prompt):
|
|
112 |
max_tokens=4096
|
113 |
)
|
114 |
|
115 |
-
response_message = response.choices[0].
|
116 |
tool_calls = response_message.tool_calls
|
117 |
|
118 |
if tool_calls:
|
@@ -141,7 +141,7 @@ def run_conversation(user_prompt):
|
|
141 |
messages=messages
|
142 |
)
|
143 |
|
144 |
-
return second_response.choices[0].
|
145 |
else:
|
146 |
return response_message.content
|
147 |
|
|
|
112 |
max_tokens=4096
|
113 |
)
|
114 |
|
115 |
+
response_message = response.choices[0].delta
|
116 |
tool_calls = response_message.tool_calls
|
117 |
|
118 |
if tool_calls:
|
|
|
141 |
messages=messages
|
142 |
)
|
143 |
|
144 |
+
return second_response.choices[0].delta.content
|
145 |
else:
|
146 |
return response_message.content
|
147 |
|