You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello @d597797974! I'm here to help you with any bugs, questions, or contributions you have. Let's get to the bottom of this together.
The error you're encountering is likely due to the ToolOutput class not being directly serializable by FastAPI's default JSON encoder. In the Langchain-Chatchat project, the BaseToolOutput class is used to handle serialization of tool outputs. This class provides a method to convert the tool's output into a string or JSON format, depending on the format parameter provided during initialization [1].
To resolve the serialization issue, ensure that the ToolOutput (or BaseToolOutput) instance is properly converted to a string or JSON before being returned by the /tool/call endpoint. You can do this by explicitly calling str() on the ToolOutput instance or ensuring it is initialized with the correct format parameter to handle JSON conversion.
调用/tool/call接口时,报错。
The text was updated successfully, but these errors were encountered: