agentscope icon indicating copy to clipboard operation
agentscope copied to clipboard

[Bug]:how to return true/false variable in using tool

Open Dang-Tu-lang opened this issue 1 year ago • 1 comments

with example for git ? output tool is "ServiceResponse" . how to tool output return true/false can Ai so that the agent can receive?

Dang-Tu-lang avatar Oct 08 '24 02:10 Dang-Tu-lang

You can use the parser module to obtain structured output from LLMs, and parse them into required format (e.g. int, float, ...). Detailed examples refer to https://github.com/modelscope/agentscope/blob/main/src/agentscope/agents/dict_dialog_agent.py

DavdGao avatar Oct 22 '24 08:10 DavdGao