🎨 change gemini safety settings
This commit is contained in:
parent
72983ac734
commit
c4c89e8e1b
@ -63,24 +63,24 @@ func (response *GeminiChatResponse) ResponseHandler(resp *http.Response) (OpenAI
|
|||||||
func (p *GeminiProvider) getChatRequestBody(request *types.ChatCompletionRequest) (requestBody *GeminiChatRequest, errWithCode *types.OpenAIErrorWithStatusCode) {
|
func (p *GeminiProvider) getChatRequestBody(request *types.ChatCompletionRequest) (requestBody *GeminiChatRequest, errWithCode *types.OpenAIErrorWithStatusCode) {
|
||||||
geminiRequest := GeminiChatRequest{
|
geminiRequest := GeminiChatRequest{
|
||||||
Contents: make([]GeminiChatContent, 0, len(request.Messages)),
|
Contents: make([]GeminiChatContent, 0, len(request.Messages)),
|
||||||
//SafetySettings: []GeminiChatSafetySettings{
|
SafetySettings: []GeminiChatSafetySettings{
|
||||||
// {
|
{
|
||||||
// Category: "HARM_CATEGORY_HARASSMENT",
|
Category: "HARM_CATEGORY_HARASSMENT",
|
||||||
// Threshold: "BLOCK_ONLY_HIGH",
|
Threshold: "BLOCK_NONE",
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// Category: "HARM_CATEGORY_HATE_SPEECH",
|
Category: "HARM_CATEGORY_HATE_SPEECH",
|
||||||
// Threshold: "BLOCK_ONLY_HIGH",
|
Threshold: "BLOCK_NONE",
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// Category: "HARM_CATEGORY_SEXUALLY_EXPLICIT",
|
Category: "HARM_CATEGORY_SEXUALLY_EXPLICIT",
|
||||||
// Threshold: "BLOCK_ONLY_HIGH",
|
Threshold: "BLOCK_NONE",
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// Category: "HARM_CATEGORY_DANGEROUS_CONTENT",
|
Category: "HARM_CATEGORY_DANGEROUS_CONTENT",
|
||||||
// Threshold: "BLOCK_ONLY_HIGH",
|
Threshold: "BLOCK_NONE",
|
||||||
// },
|
},
|
||||||
//},
|
},
|
||||||
GenerationConfig: GeminiChatGenerationConfig{
|
GenerationConfig: GeminiChatGenerationConfig{
|
||||||
Temperature: request.Temperature,
|
Temperature: request.Temperature,
|
||||||
TopP: request.TopP,
|
TopP: request.TopP,
|
||||||
|
Loading…
Reference in New Issue
Block a user