win10运行AgentVerse项目报错处理

项目地址

问题一:

ERROR:root:No API key provided. You can set your API key in code using 'openai.api_key = <API-KEY>', or you can set the environment variable OPENAI_API_KEY=<API-KEY>). If your API key is stored in a file, you can point the openai module at it with 'openai.api_key_path = <PATH>'. You can generate API keys in the OpenAI web interface. See https://platform.openai.com/account/api-keys for details.

这个是因为没有设置OPENAI_API_KEY

# 注意:这里OPENAI_API_KEY不需要加引号!!!
set OPENAI_API_KEY=你的OPENAI_API_KEY

问题二:

ERROR - root - Error communicating with OpenAI

这个我也不知道什么原因  百度了好多就是说urllib3版本问题,但是我这边修改了还是不行。

应该是因为开代理了 

# 更改urllib3版本
pip uninstall urllib3
pip install urllib3==1.25.11

# 127.0.0.1:7890 是我的代理IP
set HTTP_PROXY=http://127.0.0.1:7890 
set HTTPS_PROXY=https://127.0.0.1:7890

问题三:

宝可梦的demo运行的时候说 uvicorn 命令不存在

# 加上 python -m 的前缀运行
python -m uvicorn pokemon_server:app --reload --port 10002

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值