From fd79ebd99e06e947c557574b9aae53eaa9295abf Mon Sep 17 00:00:00 2001 From: taylor <=> Date: Tue, 12 Nov 2024 10:31:35 +0800 Subject: [PATCH] =?UTF-8?q?update:=20xai=E5=A2=9E=E5=8A=A0max=5Ftokens,max?= =?UTF-8?q?=5Fwords=E7=AD=89=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- base-config.yaml | 2 +- maubot_llmplus/thrid_platform.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/base-config.yaml b/base-config.yaml index 8c50d95..f7f1ad6 100644 --- a/base-config.yaml +++ b/base-config.yaml @@ -41,7 +41,7 @@ platforms: max_tokens: 2000 max_context_messages: 20 xai: - url: curl https://api.x.ai + url: https://api.x.ai api_key: model: grok-beta temperature: 1 diff --git a/maubot_llmplus/thrid_platform.py b/maubot_llmplus/thrid_platform.py index 889c5fc..3231951 100644 --- a/maubot_llmplus/thrid_platform.py +++ b/maubot_llmplus/thrid_platform.py @@ -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(