From aaef0c76ade976eaf6eea3e55b4c16feea4c4838 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 18 Apr 2025 10:01:02 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20=E8=87=AA=E5=8A=A8=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E5=8C=96=E4=BB=A3=E7=A0=81=20[skip=20ci]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/models/utils_model.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/plugins/models/utils_model.py b/src/plugins/models/utils_model.py index b4e2c127..51cd6473 100644 --- a/src/plugins/models/utils_model.py +++ b/src/plugins/models/utils_model.py @@ -32,7 +32,7 @@ class LLMRequest: "o3-mini", "o3-mini-2025-01-31", "o4-mini", - "o4-mini-2025-04-16" + "o4-mini-2025-04-16", ] def __init__(self, model, **kwargs): @@ -551,9 +551,7 @@ class LLMRequest: {"type": "text", "text": prompt}, { "type": "image_url", - "image_url": { - "url": f"data:image/{image_format.lower()};base64,{image_base64}" - }, + "image_url": {"url": f"data:image/{image_format.lower()};base64,{image_base64}"}, }, ], } @@ -669,9 +667,7 @@ class LLMRequest: if "max_tokens" not in data and "max_completion_tokens" not in data: data["max_tokens"] = global_config.max_response_length # 发请求 - response = await self._execute_request( - endpoint="/chat/completions", payload=data, prompt=prompt - ) + response = await self._execute_request(endpoint="/chat/completions", payload=data, prompt=prompt) # 原样返回响应,不做处理 return response