mirror of
https://github.com/Ed1s0nZ/PrivHunterAI.git
synced 2025-09-17 20:41:37 +00:00
Update deepseek.go
This commit is contained in:
parent
ddf2aea885
commit
d71acbfe57
@ -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",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user