Update kimi.go

This commit is contained in:
公明 authored and GitHub committed 2025-02-27 10:10:33 +08:00
1 parent d71acbfe57
commit bc9d7971ee
1 file changed
+3 -2
+3 -2
View File
@@ -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")
// 发送请求