从前端agent问答debug后工具无法正确调用到 #2586
Replies: 2 comments 1 reply
-
🤖 你好 @CyanMystery, 我是 Dosu,一个基于AI的助手,专门用来帮助解决代码问题、回答疑惑,并帮助你成为更好的贡献者。在等待人工维护者回复的同时,我会在这里提供帮助。希望我们能愉快的合作! 您的问题是关于
导致工具没有被调用的原因可能有几个:
要调试此问题,您可以在工具的代码中添加日志语句,以检查是否被调用以及返回什么状态。您也可以在代理的代码中添加日志,以检查它选择执行哪些工具。 关于
在这个上下文中, 相关代码如下: async def on_tool_end(self, output: str, *, run_id: UUID, parent_run_id: UUID | None = None,
tags: List[str] | None = None, **kwargs: Any) -> None:
self.out = True ## 重置输出
self.cur_tool.update(
status=Status.tool_finish,
output_str=output.replace("Answer:", ""),
)
self.queue.put_nowait(dumps(self.cur_tool)) 相关源码: 如果您需要更多的帮助,或者有其他问题,欢迎随时向我提问。 SourcesThis response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Beta Was this translation helpful? Give feedback.
-
@dosu-bot 我同样的调用函数在chatglm3官方项目测试的挺好的 放到接口里边效果就是不行 |
Beta Was this translation helpful? Give feedback.
-
elif data["status"] == Status.tool_finish 这个代码块一直进不去执行 就是tool没调用到呗
Beta Was this translation helpful? Give feedback.
All reactions