mirror of
https://github.com/Ed1s0nZ/PrivHunterAI.git
synced 2025-06-21 02:10:46 +00:00
Update aiapis.go
This commit is contained in:
parent
c3f93ee66c
commit
573ba870db
@ -88,11 +88,12 @@ func AIScan(model, aiurl, apikey, reqA, respA, respB, statusB string) (string, e
|
|||||||
"statusB": statusB,
|
"statusB": statusB,
|
||||||
}
|
}
|
||||||
|
|
||||||
inputJSON, err := json.Marshal(input)
|
inputBytes, err := json.MarshalIndent(input, "", " ")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("Error marshaling input: %v\n", err)
|
fmt.Printf("Error marshaling input: %v\n", err)
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
fmt.Println(string(inputBytes))
|
||||||
request := ChatCompletionRequest{
|
request := ChatCompletionRequest{
|
||||||
Model: model, // 根据实际模型名称修改
|
Model: model, // 根据实际模型名称修改
|
||||||
Messages: []Message{
|
Messages: []Message{
|
||||||
@ -102,11 +103,11 @@ func AIScan(model, aiurl, apikey, reqA, respA, respB, statusB string) (string, e
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
Role: "user",
|
Role: "user",
|
||||||
Content: string(inputJSON),
|
Content: string(inputBytes),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Temperature: 0.5,
|
Temperature: 0.2,
|
||||||
MaxTokens: 1000,
|
MaxTokens: 2500,
|
||||||
}
|
}
|
||||||
|
|
||||||
response, err := CreateChatCompletion(request, aiurl, apikey)
|
response, err := CreateChatCompletion(request, aiurl, apikey)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user