fix: 参数修正

This commit is contained in:
zhayujie
2023-03-18 12:25:32 +08:00
parent e95a765430
commit 100aa27587
2 changed files with 3 additions and 2 deletions

View File

@@ -9,7 +9,7 @@
"character_desc": "你是ChatGPT, 一个由OpenAI训练的大型语言模型, 你旨在回答并解决人们的任何问题,并且可以使用多种语言与人交流。"
},
"baidu": {
"acs-token": "YOUR ACS TOKEN",
"acs_token": "YOUR ACS TOKEN",
"cookie": "YOUR COOKIE"
}
},

View File

@@ -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']