update: xai增加max_tokens,max_words等参数

This commit is contained in:
taylor
2024-11-12 10:31:35 +08:00
parent 094033fb76
commit fd79ebd99e
2 changed files with 2 additions and 2 deletions

View File

@@ -150,7 +150,7 @@ class XAi(Platform):
request_body["temperature"] = self.temperature
endpoint = f"{self.url}/v1/chat/completions"
async with self.http.post(url=endpoint, data=json.dumps(request_body), headers=headers) as resp:
async with self.http.post(url=endpoint, data=json.dumps(request_body), headers=headers) as response:
# plugin.log.debug(f"响应内容:{response.status}, {await response.json()}")
if response.status != 200:
return ChatCompletion(