[Bug]: Docstring Args descriptions silently missing from FunctionTool schema sent to the LLM

该问题发生在使用 LlamaIndex FunctionTool.from_defaults() 创建工具时,函数 docstring 里写好的 Args 参数描述不会出现在最终发给 LLM 的 OpenAI Tool Schema 中(表现为 [Bug]: Docstring Args descr

快速结论:该问题发生在使用 LlamaIndex FunctionTool.from_defaults() 创建工具时,函数 docstring 里写好的 Args 参数描述不会出现在最终发给 LLM 的 OpenAI Tool Schema 中(表现为 [Bug]: Docstring Args descriptions silently missing from FunctionTool schema sent to the LLM)。优先排查你使用的 LlamaIndex 版本是否已包含修复 PR #22414;如果暂时无法升级,先用 AnnotatedField(description=...)

参考来源

run-llama/llama_index #22413

GamsGo AI

AI 工具推荐

想把多个 AI 模型放在一个入口?

GamsGo AI 集成 ChatGPT、DeepSeek、Gemini、Claude、Midjourney、Veo 等常用模型,适合写作、绘图、视频和日常 AI 工作流。

了解 GamsGo AI

推广链接:通过此链接购买,我可能获得佣金,不影响你的价格。

这个方案解决了吗?

celebrityanime
celebrityanime
文章: 18313

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注