From bc9d7971ee8b64f94892c51690635f7418f497fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AC=E6=98=8E?= <83812544+Ed1s0nZ@users.noreply.github.com> Date: Thu, 27 Feb 2025 10:10:33 +0800 Subject: [PATCH] Update kimi.go --- AIAPIS/kimi.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/AIAPIS/kimi.go b/AIAPIS/kimi.go index 0396032..8a25de1 100644 --- a/AIAPIS/kimi.go +++ b/AIAPIS/kimi.go @@ -6,6 +6,7 @@ import ( "errors" "fmt" "net/http" + "yuequanScan/config" ) // 定义请求参数结构体 @@ -40,7 +41,7 @@ func Kimi(url, respA, respB string) (string, error) { Messages: []MessageKimi{ { Role: "system", - Content: prompt, + Content: config.Prompt, }, { Role: "user", @@ -63,7 +64,7 @@ func Kimi(url, respA, respB string) (string, error) { fmt.Println("创建请求失败:", err) return "", err } - req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", apiKeyKimi)) + req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", config.GetConfig().APIKeys.Kimi)) req.Header.Set("Content-Type", "application/json") // 发送请求