Browse Source

update readme

master
6vision 5 months ago
parent
commit
5de8e94bb4
2 changed files with 9 additions and 6 deletions
  1. +1
    -1
      README.md
  2. +8
    -5
      bot/baidu/baidu_wenxin.py

+ 1
- 1
README.md View File

@@ -167,7 +167,7 @@ pip3 install -r requirements-optional.txt

**4.其他配置**

+ `model`: 模型名称,目前支持 `gpt-3.5-turbo`, `gpt-4o`, `gpt-4-turbo`, `gpt-4`, `wenxin` , `claude` , `gemini`, `glm-4`, `xunfei`, `moonshot`等,全部模型名称参考`common/const.py`文件
+ `model`: 模型名称,目前支持 `gpt-3.5-turbo`, `gpt-4o`, `gpt-4-turbo`, `gpt-4`, `wenxin` , `claude` , `gemini`, `glm-4`, `xunfei`, `moonshot`等,全部模型名称参考[common/const.py](https://github.com/zhayujie/chatgpt-on-wechat/blob/master/common/const.py)文件
+ `temperature`,`frequency_penalty`,`presence_penalty`: Chat API接口参数,详情参考[OpenAI官方文档。](https://platform.openai.com/docs/api-reference/chat)
+ `proxy`:由于目前 `openai` 接口国内无法访问,需配置代理客户端的地址,详情参考 [#351](https://github.com/zhayujie/chatgpt-on-wechat/issues/351)
+ 对于图像生成,在满足个人或群组触发条件外,还需要额外的关键词前缀来触发,对应配置 `image_create_prefix `


+ 8
- 5
bot/baidu/baidu_wenxin.py View File

@@ -18,11 +18,14 @@ class BaiduWenxinBot(Bot):

def __init__(self):
super().__init__()
wenxin_model = conf().get("baidu_wenxin_model") or "completions"
if conf().get("model") and conf().get("model") == const.WEN_XIN:
wenxin_model = "completions"
if conf().get("model") and conf().get("model") == const.WEN_XIN_4:
wenxin_model = "completions_pro"
wenxin_model = conf().get("baidu_wenxin_model")
if wenxin_model is not None:
wenxin_model = conf().get("baidu_wenxin_model") or "eb-instant"
else:
if conf().get("model") and conf().get("model") == const.WEN_XIN:
wenxin_model = "completions"
elif conf().get("model") and conf().get("model") == const.WEN_XIN_4:
wenxin_model = "completions_pro"

self.sessions = SessionManager(BaiduWenxinSession, model=wenxin_model)



Loading…
Cancel
Save