MetaGLM / glm-cookbook

Examples and guides for using the GLM APIs
https://open.bigmodel.cn/
Apache License 2.0
726 stars 79 forks source link

GLM-4如何调用非智普AI开放平台的知识库 #11

Closed KevinFanng closed 5 months ago

KevinFanng commented 5 months ago

Feature request / 功能建议

prompt_template = """ …… """ knowledge_id = ## my knowledge base id response = client.chat.completions.create( model="glm-4", messages=[ {"role": "user", "content": ""}, ], tools=[ { "type": "retrieval", "retrieval": { "knowledge_id": knowledge_id, #这里是调用“智普AI开放平台的知识库”,能不能调用其他的知识库? "prompt_template": prompt_template, } } ], stream=False, )

Motivation / 动机

Your contribution / 您的贡献

zRzRzRzRzRzRzR commented 5 months ago

retrieval只能调智谱的,如果非智谱的就是根OpenAI一样要打Langchain这种框架配合了

KevinFanng commented 5 months ago

感谢回复,我刚在下午langchain-Chatchat上实现。https://zhuanlan.zhihu.com/p/689864883

---原始邮件--- 发件人: @.> 发送时间: 2024年3月30日(周六) 晚上9:02 收件人: @.>; 抄送: @.**@.>; 主题: Re: [MetaGLM/glm-cookbook] GLM-4如何调用非智普AI开放平台的知识库 (Issue #11)

retrieval只能调智谱的,如果非智谱的就是根OpenAI一样要打Langchain这种框架配合了

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>