GLM-4 icon indicating copy to clipboard operation
GLM-4 copied to clipboard

我希望能将glm4 composite_demo中特别是工具调用功能能够用api接入前端,该如何操作

Open mono-chen opened this issue 1 year ago • 1 comments

System Info / 系統信息

stream页面可以正常使用

Who can help? / 谁可以帮助到您?

No response

Information / 问题信息

  • [ ] The official example scripts / 官方的示例脚本
  • [ ] My own modified scripts / 我自己修改的脚本和任务

Reproduction / 复现过程

我的想法就是将glm4 composite_demo运行后,我在另一个地方询问,然后可以调用这个接口回答,主要是需要其function calling的功能,我看有这样子的话 自行构建服务端,并使用 OpenAI API 的请求格式与 GLM-4-9B-Chat 模型进行对话。本 demo 支持 Function Call 和 All Tools功能。 启动服务端:

python openai_api_server.py 那这个代码里面如果我要实现可以执行function calling的功能的话,该如何修改并使用何种方式调用

Expected behavior / 期待表现

期待大家的回答

mono-chen avatar Sep 02 '24 03:09 mono-chen

启动openai_api_server服务,然后前端请求你的服务器地址不行吗

zhipuch avatar Sep 03 '24 06:09 zhipuch