From 411f8f2e78ed2e74eb1a8c657781769ecbd83122 Mon Sep 17 00:00:00 2001 From: tbphp Date: Sun, 13 Jul 2025 22:14:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=B0=83=E6=95=B4=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/channel/gemini_channel.go | 2 +- internal/channel/openai_channel.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/channel/gemini_channel.go b/internal/channel/gemini_channel.go index 053eef4..6d552c1 100644 --- a/internal/channel/gemini_channel.go +++ b/internal/channel/gemini_channel.go @@ -86,7 +86,7 @@ func (ch *GeminiChannel) ValidateKey(ctx context.Context, key string) (bool, err payload := gin.H{ "contents": []gin.H{ {"parts": []gin.H{ - {"text": "Only output 'ok'"}, + {"text": "hi"}, }}, }, } diff --git a/internal/channel/openai_channel.go b/internal/channel/openai_channel.go index 016e0d1..1f014a8 100644 --- a/internal/channel/openai_channel.go +++ b/internal/channel/openai_channel.go @@ -84,9 +84,9 @@ func (ch *OpenAIChannel) ValidateKey(ctx context.Context, key string) (bool, err payload := gin.H{ "model": ch.TestModel, "messages": []gin.H{ - {"role": "user", "content": "Only output 'ok'"}, + {"role": "user", "content": "hi"}, }, - "max_tokens": 1, + "max_tokens": 100, } body, err := json.Marshal(payload) if err != nil {