labring / FastGPT

FastGPT is a knowledge-based platform built on the LLMs, offers a comprehensive suite of out-of-the-box capabilities such as data processing, RAG retrieval, and visual AI workflow orchestration, letting you easily develop and deploy complex question-answering systems without the need for extensive setup or configuration.
https://tryfastgpt.ai
Other
17.51k stars 4.7k forks source link

能不能支持下 Function Calling #761

Closed zaite closed 7 months ago

zaite commented 9 months ago

例行检查

功能描述 现在很多大模型都更新了Function Calling,这让大模型实现了外部调用能力,更加智能和灵活,fastgpt本身就有模块插件这个功能,如果能结合估计就更加完美了

应用场景 联网查询,插件式调用,可扩展,函数调用 相关示例

另一款类似开源项目lobe chat的插件就是用到了Function Calling,制作了很多插件,对于开发者本身也可以通过函数集成更多服务

c121914yu commented 9 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Routine inspection

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.

c121914yu commented 9 months ago

根据 openai 官方,fc 已经弃用了。

zaite commented 9 months ago

根据 openai 官方,fc 已经弃用了。

这。。国内几个模型都刚跟上,openai 就弃用啦🥲

c121914yu commented 9 months ago

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🥲

hponiang commented 9 months ago

tool_calls 可以接替 fc 功能

c121914yu commented 9 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


tool_calls can take over the fc function

zys-997z commented 9 months ago

根据 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的不同,不知作者能否将这个小适配加入到工程中

zhanghx0905 commented 8 months ago

我看到Tools模块在roadmap里,现在如果想要使用tools,就需要在高级编排里用”问题分类+字段提取+HTTP调用“对吧 除了gpt4之外,有一些开源的模型和调度引擎,比如qwen+xinference已经支持tools的API了

c121914yu commented 8 months ago

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.

c121914yu commented 7 months ago

4.7 已支持

SongSongK commented 6 months ago

根据 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调用解析还是不太正常。