mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-08-27 12:30:13 +03:00
Fixed tool output serialization in tool_node function to ensure ToolMessage.content is always in JSON format, not Python str() representation. This fixes the issue where conversation history showed tool outputs with single quotes (Python format) instead of standard JSON. Changes: - Added json import to gns3_copilot.py - Modified tool_node() to serialize observation to JSON before creating ToolMessage - Ensures both SSE streaming and history storage use consistent JSON format Root cause: ToolMessage was created with raw dict/list objects, which LangChain converted to Python str() representation when saving to history. Co-Authored-By: YueGuobin <yueguobin@outlook.com>