dlflannery commited on
Commit
25c1380
·
verified ·
1 Parent(s): ef585a9

Update app.py

Browse files

fixed make_pdf tool call handling

Files changed (1) hide show
  1. app.py +3 -2
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.name == 'make_pdf':
365
- pdf_id = raw.call_id
 
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']