Skip to content

fix: report chat returning nested object instead of string#23

Open
divyansh-1611 wants to merge 1 commit intonikmcfly:mainfrom
divyansh-1611:fix/report-chat-response-format
Open

fix: report chat returning nested object instead of string#23
divyansh-1611 wants to merge 1 commit intonikmcfly:mainfrom
divyansh-1611:fix/report-chat-response-format

Conversation

@divyansh-1611
Copy link
Copy Markdown

Problem

The /api/report/chat endpoint was passing the full dict from agent.chat() directly as data.response. Since agent.chat() returns {"response": "...", "sources": [...], "tool_calls": [...]}, the frontend ended up receiving an object instead of a string — so chat replies either showed as [object Object] or didn't render at all.

Fix

Flatten the result dict into separate top-level fields in the response payload so data.response is a plain string, matching what the frontend expects at Step5Interaction.vue:700.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant