Spaces:
Sleeping
Sleeping
Update app.py
Browse filesfixed make_pdf tool call handling
app.py
CHANGED
|
@@ -361,8 +361,9 @@ async def chat(prompt_window, user_window, password, history, output_window,
|
|
| 361 |
|
| 362 |
if item.type == 'tool_call_item':
|
| 363 |
raw = item.raw_item
|
| 364 |
-
if raw.
|
| 365 |
-
|
|
|
|
| 366 |
|
| 367 |
if item.type == 'tool_call_output_item' and pdf_id:
|
| 368 |
raw_id = item.raw_item['call_id']
|
|
|
|
| 361 |
|
| 362 |
if item.type == 'tool_call_item':
|
| 363 |
raw = item.raw_item
|
| 364 |
+
if raw.type == 'function_call' and raw.status == 'completed':
|
| 365 |
+
if raw.name == 'make_pdf':
|
| 366 |
+
pdf_id = raw.call_id
|
| 367 |
|
| 368 |
if item.type == 'tool_call_output_item' and pdf_id:
|
| 369 |
raw_id = item.raw_item['call_id']
|