能不能支持下 Function Calling
例行检查
- [x] 我已确认目前没有类似 features
- [x] 我已确认我已升级到最新版本
- [x] 我已完整查看过项目 README,已确定现有版本无法满足需求
- [x] 我理解并愿意跟进此 features,协助测试和提供反馈
- [x] 我理解并认可上述内容,并理解项目维护者精力有限,不遵循规则的 features 可能会被无视或直接关闭
功能描述 现在很多大模型都更新了Function Calling,这让大模型实现了外部调用能力,更加智能和灵活,fastgpt本身就有模块插件这个功能,如果能结合估计就更加完美了
应用场景 联网查询,插件式调用,可扩展,函数调用 相关示例
另一款类似开源项目lobe chat的插件就是用到了Function Calling,制作了很多插件,对于开发者本身也可以通过函数集成更多服务
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Routine inspection
- [x] I have confirmed that there are currently no similar features
- [x ] I have confirmed that I have upgraded to the latest version
- [x] I have fully reviewed the project README and determined that the existing version cannot meet the needs.
- [x ] I understand and am willing to follow up on this feature, assist with testing and provide feedback
- [x] I understand and agree with the above content, and understand that project maintainers have limited energy. Features that do not follow the rules may be ignored or closed directly
Function description Now many large models have updated Function Calling, which allows large models to achieve external calling capabilities and become more intelligent and flexible.
Application Scenario Internet query, plug-in call, extensible, function call Related Examples
Another plug-in similar to the open source project lobe chat uses Function Calling. Many plug-ins have been produced. Developers themselves can also integrate more services through functions.
根据 openai 官方,fc 已经弃用了。
根据 openai 官方,fc 已经弃用了。
这。。国内几个模型都刚跟上,openai 就弃用啦🥲
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
According to openai official, fc has been deprecated.
this. . Several domestic models have just caught up, and OpenAI has abandoned it🥲
tool_calls 可以接替 fc 功能
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
tool_calls can take over the fc function
根据 openai 官方,fc 已经弃用了。
经过我自己的测试,我发现当使用chatGLM3的fc功能时需要将extract.ts和classifyQuestion.ts中的 response?.choices?.[0]?.message?.tool_calls?.[0]?.function?.arguments || '{}' 替换为 response?.choices?.[0]?.message?.function_call?.arguments || '{}' 才可使用,否则会一直返回空字段,可能chatGLM3返回的response的json结构与openai的不同,不知作者能否将这个小适配加入到工程中
我看到Tools模块在roadmap里,现在如果想要使用tools,就需要在高级编排里用”问题分类+字段提取+HTTP调用“对吧 除了gpt4之外,有一些开源的模型和调度引擎,比如qwen+xinference已经支持tools的API了
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
I saw that the Tools module is in the roadmap. Now if you want to use tools, you need to use "Problem Classification + Field Extraction + HTTP Call" in advanced orchestration, right? In addition to gpt4, there are some open source models and scheduling engines, such as qwen+xinference, which already supports the tools API.
4.7 已支持
根据 openai 官方,fc 已经弃用了。
经过我自己的测试,我发现当使用chatGLM3的fc功能时需要将extract.ts和classifyQuestion.ts中的 response?.choices?.[0]?.message?.tool_calls?.[0]?.function?.arguments || '{}' 替换为 response?.choices?.[0]?.message?.function_call?.arguments || '{}' 才可使用,否则会一直返回空字段,可能chatGLM3返回的response的json结构与openai的不同,不知作者能否将这个小适配加入到工程中
@c121914yu 支持这个功能了吗,我试了下 ChatGLM3 tools调用解析还是不太正常。