-
Notifications
You must be signed in to change notification settings - Fork 15.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
community:ChatZhipuAI:ADAPTS to new version zhipuai library #16459
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
检查一下你的文档,你把秘钥弄上去了 @ptonlix |
@ptonlix 大佬,单元测试没过,看起来是单元测试这边的依赖没有更新到zhipu 2.0.1。 |
谢谢 没注意~ |
有点难顶,依赖冲突了。zhipuai 所需pydantic版本太高 |
难顶,看来只能抄下大佬代码,先用着了。 |
大佬代码在哪里? |
看一下我的commit |
glm = ChatZhipuAI(
temperature=0.5,
api_key=zhipuai_api_key,
model="chatglm_turbo",
)
from langchain_core.prompts import ChatPromptTemplate
prompt = ChatPromptTemplate.from_messages([
("system", "You are world class technical documentation writer."),
("user", "{input}")
])
chain = prompt | glm
chain.invoke({"input": "how can langsmith help with testing?"}) @ptonlix 你好,我在学习langchain过程,替换你的代码之后,正常的invoke是没有问题的,但是用chain遇到以下报错,但是我没找到问题在哪,你有遇到这个问题吗?
|
模型名称“chatglm_turbo”已过期。现在仅支持glm-3-turbo或以上模型。具体可参考官方api文档 https://open.bigmodel.cn/dev/api#language 另外感谢楼主开源出适配最新gml的版本 |
hey @ptonlix, is this pr still needed? |
@ptonlix @baskaryan This PR should be closed, already solved by #16695. |
closing per ^ |
Zhipuai library information: https://pypi.org/project/zhipuai/
Zhipuai official API documentation: https://open.bigmodel.cn/dev/api#glm-3-turbo