Update deepseek.go

This commit is contained in:
公明 2025-02-27 10:10:04 +08:00 committed by GitHub
parent ddf2aea885
commit d71acbfe57
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,6 +8,7 @@ import (
"io" "io"
"net/http" "net/http"
"time" "time"
"yuequanScan/config"
) )
const ( const (
@ -55,7 +56,7 @@ func CreateChatCompletion(request ChatCompletionRequestDeepSeek) (*ChatCompletio
} }
req.Header.Set("Content-Type", "application/json") req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+apiKeyDeepSeek) req.Header.Set("Authorization", "Bearer "+config.GetConfig().APIKeys.DeepSeek)
resp, err := client.Do(req) resp, err := client.Do(req)
if err != nil { if err != nil {
@ -87,7 +88,7 @@ func DeepSeek(url, respA, respB string) (string, error) {
Messages: []MessageDeepSeek{ Messages: []MessageDeepSeek{
{ {
Role: "system", Role: "system",
Content: prompt, Content: config.Prompt,
}, },
{ {
Role: "user", Role: "user",