Skip to content

Commit 24cd1d1

Browse files
committed
fix: "Object of type datetime is not JSON serializable" error in mcp chat
1 parent 7b3b45e commit 24cd1d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/apps/chat/task/llm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,7 @@ def run_task(self, in_chat: bool = True, stream: bool = True,
10471047
if in_chat:
10481048
yield 'data:' + orjson.dumps({'content': 'execute-success', 'type': 'sql-data'}).decode() + '\n\n'
10491049
if not stream:
1050-
json_result['data'] = result.get('data')
1050+
json_result['data'] = get_chat_chart_data(_session, self.record.id)
10511051

10521052
if finish_step.value <= ChatFinishStep.QUERY_DATA.value:
10531053
if stream:

0 commit comments

Comments
 (0)