diff --git a/config-template.json b/config-template.json index 23be7fe..3202a99 100644 --- a/config-template.json +++ b/config-template.json @@ -9,7 +9,7 @@ "character_desc": "你是ChatGPT, 一个由OpenAI训练的大型语言模型, 你旨在回答并解决人们的任何问题,并且可以使用多种语言与人交流。" }, "baidu": { - "acs-token": "YOUR ACS TOKEN", + "acs_token": "YOUR ACS TOKEN", "cookie": "YOUR COOKIE" } }, diff --git a/model/baidu/yiyan_model.py b/model/baidu/yiyan_model.py index 545de6f..6d0004a 100644 --- a/model/baidu/yiyan_model.py +++ b/model/baidu/yiyan_model.py @@ -45,7 +45,7 @@ class YiyanModel(Model): "deviceType": "pc" } res = requests.post(url=self.base_url+'/session/new', headers=self._create_header(), json=data) - print(res.headers) + # print(res.headers) context['chat_session_id'] = res.json()['data']['sessionId'] @@ -63,6 +63,7 @@ class YiyanModel(Model): "msg": "" } res = requests.post(url=self.base_url+'/chat/new', headers=headers, json=data) + print(res.text) context['chat_id'] = res.json()['data']['botChat']['id'] context['parent_chat_id'] = res.json()['data']['botChat']['parent']