Spaces:
Sleeping
Sleeping
Commit
·
825b264
1
Parent(s):
72d1759
update: show initial streaming
Browse files
app.py
CHANGED
@@ -138,7 +138,7 @@ def chat(
|
|
138 |
if tool_call.function.name == "get_image":
|
139 |
# Return the image directly in the chat
|
140 |
image_data = get_image_crop(cid, rsid, uid)
|
141 |
-
|
142 |
messages.append(response.choices[0].message)
|
143 |
function_call_result_message = {
|
144 |
"role": "tool",
|
@@ -418,20 +418,19 @@ def create_chat_interface():
|
|
418 |
display_processing_message,
|
419 |
inputs=[chatbot],
|
420 |
outputs=[chatbot],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
421 |
)
|
422 |
-
# .then(
|
423 |
-
# stream_initial_analysis,
|
424 |
-
# inputs=[
|
425 |
-
# chatbot,
|
426 |
-
# transcript_processor_state,
|
427 |
-
# call_id_state,
|
428 |
-
# colab_id_state,
|
429 |
-
# origin_state,
|
430 |
-
# ct_state,
|
431 |
-
# uid_state,
|
432 |
-
# ],
|
433 |
-
# outputs=[chatbot],
|
434 |
-
# )
|
435 |
return demo
|
436 |
|
437 |
|
|
|
138 |
if tool_call.function.name == "get_image":
|
139 |
# Return the image directly in the chat
|
140 |
image_data = get_image_crop(cid, rsid, uid)
|
141 |
+
print(response.choices[0].message)
|
142 |
messages.append(response.choices[0].message)
|
143 |
function_call_result_message = {
|
144 |
"role": "tool",
|
|
|
418 |
display_processing_message,
|
419 |
inputs=[chatbot],
|
420 |
outputs=[chatbot],
|
421 |
+
).then(
|
422 |
+
stream_initial_analysis,
|
423 |
+
inputs=[
|
424 |
+
chatbot,
|
425 |
+
transcript_processor_state,
|
426 |
+
call_id_state,
|
427 |
+
colab_id_state,
|
428 |
+
origin_state,
|
429 |
+
ct_state,
|
430 |
+
uid_state,
|
431 |
+
],
|
432 |
+
outputs=[chatbot],
|
433 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
434 |
return demo
|
435 |
|
436 |
|