From c930d1689ce2f40ef009ac19b65aab8aac4223b1 Mon Sep 17 00:00:00 2001 From: jiangwel Date: Mon, 24 Nov 2025 16:51:09 +0800 Subject: [PATCH] =?UTF-8?q?fix(helper):=20=E6=9B=B4=E6=96=B0=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E8=BE=93=E5=85=A5=E6=8F=90=E7=A4=BA=E6=96=87=E6=9C=AC?= =?UTF-8?q?=20refactor(test):=20=E7=BB=9F=E4=B8=80=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E5=91=BD=E5=90=8D=E5=B9=B6=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改helper.go中的图片输入提示文本,移除多余内容 在test/backend/main.go中统一参数命名并添加请求日志 --- test/backend/main.go | 6 ++++-- usecase/helper.go | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/test/backend/main.go b/test/backend/main.go index 8bd8933..bc2f01d 100644 --- a/test/backend/main.go +++ b/test/backend/main.go @@ -71,12 +71,14 @@ func (p *ModelKitHandler) CheckModel(c echo.Context) error { // 绑定基本字段 req.Provider = c.QueryParam("provider") - req.Model = c.QueryParam("model_name") + req.Model = c.QueryParam("model") req.BaseURL = c.QueryParam("base_url") req.APIKey = c.QueryParam("api_key") req.APIHeader = c.QueryParam("api_header") req.APIVersion = c.QueryParam("api_version") - req.Type = c.QueryParam("model_type") + req.Type = c.QueryParam("type") + + p.logger.Info("CheckModel req:", req) // 单独处理 param 字段 paramStr := c.QueryParam("param") diff --git a/usecase/helper.go b/usecase/helper.go index 4fd559f..7177bde 100644 --- a/usecase/helper.go +++ b/usecase/helper.go @@ -117,7 +117,7 @@ func getInputMsg(req *domain.CheckModelReq) []*schema.Message { inputMsg[0].MultiContent = []schema.ChatMessagePart{ { Type: schema.ChatMessagePartTypeText, - Text: "What's in the picture? Only answer me a word.If you don't support image input, reply no.", + Text: "What's in the picture? Only answer me a word.", }, { Type: schema.ChatMessagePartTypeImageURL,