update: xai增加max_tokens,max_words等参数
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user