MetaGLM / glm-cookbook

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

ImportError: cannot import name 'ZhipuAI' from 'zhipuai' #7

Closed yongxingMa closed 8 months ago

yongxingMa commented 8 months ago

System Info / 系統信息

zhipuai-2.0.1

Information / 问题信息

Reproduction / 复现过程

import os from zhipuai import ZhipuAI client = ZhipuAI()

Expected behavior / 期待表现

import os from zhipuai import ZhipuAI client = ZhipuAI()

zRzRzRzRzRzRzR commented 8 months ago

嗯?检查一下你环境内的库和pydantic,一定要是2.0.1的zhipuai,估计是没有安装成功,还是0.1.x的

heiheiheibj commented 5 months ago

pip install zhipuai==2.0.1.20240429 -i https://pypi.tuna.tsinghua.edu.cn/simple zhipuai 就可以了