Comments (9)
compose里面加上
environment:
OPEN_AI_API_KEY: 'sk-'
MODEL: 'deepseek-chat'
open_ai_api_base: 'https://api.deepseek.com/v1'
即可,5.21号成功接入
from chatgpt-on-wechat.
接口和openai的一样,把对应的api和url修改一下就行,openai模块里面的__init__.py
from chatgpt-on-wechat.
同问,我修改了以下三个地方
"model": "deepseek-chat",
"open_ai_api_key": "",
"open_ai_api_base":"https://api.deepseek.com/v1"
会报错
ModuleNotFoundError: No module named 'openai'
from chatgpt-on-wechat.
No module named 'openai',没装模块,init.py是openai模块的文件,这个文件在python模块包里面
from chatgpt-on-wechat.
init 里面api 和 url 设置完还是报错了, :
Start auto replying.
[INFO][2024-05-13 02:47:05][chat_channel.py:117] - [WX]receive group at
[INFO][2024-05-13 02:47:05][bridge.py:61] - create bot chatGPT for chat
[INFO][2024-05-13 02:47:05][chat_gpt_bot.py:49] - [CHATGPT] query=测试
[ERROR][2024-05-13 02:47:05][chat_gpt_bot.py:155] - [CHATGPT] Exception: Incorrect API key provided: sk-493bd482b. You can find your API key at https://platform.openai.com/account/api-keys.
Traceback (most recent call last):
File "D:\Python_Pro\WeChatAI\chatgpt-on-wechat\bot\chatgpt\chat_gpt_bot.py", line 123, in reply_text
response = openai.ChatCompletion.create(api_key=api_key, messages=session.messages, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Python_Pro\WeChatAI.venv\Lib\site-packages\openai\api_resources\chat_completion.py", line 25, in create
return super().create(*args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Python_Pro\WeChatAI.venv\Lib\site-packages\openai\api_resources\abstract\engine_api_resource.py", line 153, in create
response, _, api_key = requestor.request(
^^^^^^^^^^^^^^^^^^
File "D:\Python_Pro\WeChatAI.venv\Lib\site-packages\openai\api_requestor.py", line 298, in request
resp, got_stream = self._interpret_response(result, stream)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Python_Pro\WeChatAI.venv\Lib\site-packages\openai\api_requestor.py", line 700, in _interpret_response
self._interpret_response_line(
File "D:\Python_Pro\WeChatAI.venv\Lib\site-packages\openai\api_requestor.py", line 763, in _interpret_response_line
raise self.handle_error_response(
openai.error.AuthenticationError: Incorrect API key provided: sk-493bd482b. You can find your API key at https://platform.openai.com/accou File "D:\Python_Pro\WeChatAI.venv\Lib\site-packages\openai\api_requestor.py", line 763, in _interpret_response_line
raise self.handle_error_response(
openai.error.AuthenticationError: Incorrect API key provided: sk-493bd*******************482b. You can find your API key at https://platform.openai.com/account/api-keys.
[INFO][2024-05-13 02:47:06][wechat_channel.py:217] - [WX] sendMsg=Reply(type=ERROR, content=[ERROR]
我现在有点累了,等会再来吧), receiver=@@1564c9ea34355971640d97991179deebda3c928806cb849eab788be4a42579da
from chatgpt-on-wechat.
"open_ai_api_base":"https://api.deepseek.com/v1" ---> "open_ai_api_base":"https://api.deepseek.com"
用deepseek的话就别切模型了,切出去就切不回来了。。只能重启容器
from chatgpt-on-wechat.
"open_ai_api_base":"https://api.deepseek.com/v1" ---> "open_ai_api_base":"https://api.deepseek.com" 用deepseek的话就别切模型了,切出去就切不回来了。。只能重启容器
init.py里试了也不行.
...
api_key = os.environ.get("DEEPSEEK_API_KEY")
Path of a file with an API key, whose contents can change. Supercedes
api_key
if set. The main use case is volume-mounted Kubernetes secrets,
which are updated automatically.
api_key_path: Optional[str] = os.environ.get("OPENAI_API_KEY_PATH")
organization = os.environ.get("OPENAI_ORGANIZATION")
api_base = os.environ.get("DEEPSEEK_API_BASE", "https://api.deepseek.com")
api_type = os.environ.get("OPENAI_API_TYPE", "open_ai")
....
大佬你那边是改了什么, 可以帮忙告知下吗?
from chatgpt-on-wechat.
按照下面修改填写即可使用
"open_ai_api_key": "sk-589a4798c3a3d48fb74",
"open_ai_api_base": "https://api.deepseek.com/v1",
"model": "deepseek-chat",
from chatgpt-on-wechat.
compose里面加上 environment: OPEN_AI_API_KEY: 'sk-' MODEL: 'deepseek-chat' open_ai_api_base: 'https://api.deepseek.com/v1' 即可,5.21号成功接入
可以了, 非常感谢大佬! 很奇怪为什么 docker部署启动可以, 但 app.py运行就不行...config都是按照 deepseek官方指导的去配置的.
from chatgpt-on-wechat.
Related Issues (20)
- 希望功能新增:添加将公众号信息转发到另外的服务,
- 飞书应用事件配置失败 HOT 2
- 企业微信不可Callback
- 使用外部配置文件 config.yml,企业微信中无法 callback,报错. HOT 1
- 百度wenxin-千帆配置建议 HOT 2
- 使用fastgpt接入chatgpt-on-wechat后,聊天记录不会在后台产生希望能修复此功能 HOT 8
- 应用是否正确处理了健康检查请求,例如响应HTTP状态码200。 HOT 1
- 能加入llama吗,毕竟它免费好香 HOT 1
- 请教COW连接了fastgpt的API后,openai的语音就不能使用有啥好的解决方法? HOT 1
- 请求添加功能:自动微信接龙插件
- 扩大模型范围,新增支持用户自己部署的大模型 HOT 4
- 绘图接入Fooocus HOT 1
- 最新版COW对接最新版oneapi下阿里渠道无法对话 HOT 2
- 如果引用了某个对话内容,机器人将不会回复。
- 个人微信建议基于消息免打扰判定是否机器人代理回复 HOT 1
- 什么时候能增加语言和视频聊天功能
- 已在支付处实名验证过的Wechat帐号(非微信)不可扫码登录 HOT 1
- 请问是否支持对接maxkb
- 配置文生图,cogview-3不生效
- [INFO][2024-06-05 22:42:45][wechat_channel.py:217] - [WX] sendMsg=Reply(type=ERROR, content=[ERROR] 插件开启失败), receiver=@dd9c8c40074d097500c53ed66885e32571a3b521c520acbcd1b2a41297bb9cf5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chatgpt-on-wechat.