Closed shyBoy-ico closed 5 months ago
conversation_id打印一下
async def qwen_ai_free(self, params, model='qwen-turbo', stream=False):
headers = {
'Authorization': f'Bearer {self.auth_token}',
'Content-Type': 'application/json'
}
data = {
'model': model,
'conversation_id': params['convers_id'],
'messages': [{
'role': 'user',
'content': params['question']
}],
'stream': stream
}
print(data)
url = self.base_url+'/v1/chat/completions'
response = requests.post(url, headers=headers, json=data)
return response.json()
{'model': 'qwen-turbo', 'conversation_id': 'fcbcc9f9dd86491ba0a2bd8aed0a9247', 'messages': [{'role': 'user', 'content': '他会和周树人打架嘛'}], 'stream': False}
你应该更新到最新版本了,最新版本的conversation_id是类似bc9ef150d0e44794ab624df958292300-40811965812e4782bb87f1a9e4e2b2cd
就是我要更新我的版本是吧
是的
提供你的传参检查