diff options
Diffstat (limited to 'backend/app')
| -rw-r--r-- | backend/app/services/llm.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/backend/app/services/llm.py b/backend/app/services/llm.py index 87b9155..6f79d35 100644 --- a/backend/app/services/llm.py +++ b/backend/app/services/llm.py @@ -159,10 +159,13 @@ async def stream_openai( for out in final_resp.output: out_type = getattr(out, 'type', None) out_content = getattr(out, 'content', None) + print(f"[responses debug] output item: type={out_type}, content={out_content}") if out_type == 'message' and out_content: for c in out_content: c_type = getattr(c, 'type', None) + c_text = getattr(c, 'text', None) + print(f"[responses debug] content item: type={c_type}, text={c_text[:100] if c_text else None}...") if c_type == 'output_text': text_val = getattr(c, 'text', None) if text_val: @@ -170,7 +173,8 @@ async def stream_openai( found_content = True if not found_content: - yield f"\n[Debug: Completed but no content. Resp: {final_resp}]" + print(f"[responses debug] No content found! final_resp.output={final_resp.output}") + yield f"\n[Debug: Completed but no content extracted]" return elif final_resp.status in ['failed', 'cancelled', 'expired']: |
