Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[问题]: 关于Gemini的safety settings #664

Closed
dragonjay-lyj opened this issue Jan 6, 2025 · 3 comments
Closed

[问题]: 关于Gemini的safety settings #664

dragonjay-lyj opened this issue Jan 6, 2025 · 3 comments
Assignees

Comments

@dragonjay-lyj
Copy link

您的问题

我想问一下Gemini的safety settings是默认的还是调过的

相关背景

No response

补充信息

如果是默认的我希望能给用户一个自行调整的选项

优先级

低 (有空再看)

@kangfenmao
Copy link
Collaborator

        safetySettings: [
          { category: HarmCategory.HARM_CATEGORY_HATE_SPEECH, threshold: HarmBlockThreshold.BLOCK_NONE },
          {
            category: HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT,
            threshold: HarmBlockThreshold.BLOCK_NONE
          },
          { category: HarmCategory.HARM_CATEGORY_HARASSMENT, threshold: HarmBlockThreshold.BLOCK_NONE },
          { category: HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT, threshold: HarmBlockThreshold.BLOCK_NONE }
        ]

这样的

@wangxiangg1
Copy link

wangxiangg1 commented Jan 8, 2025

{
"candidates": [
{
"finishReason": "SAFETY",
"safetyRatings": [
{
"category": "HARM_CATEGORY_HATE_SPEECH",
"probability": "NEGLIGIBLE"
},
{
"category": "HARM_CATEGORY_DANGEROUS_CONTENT",
"probability": "NEGLIGIBLE"
},
{
"category": "HARM_CATEGORY_HARASSMENT",
"probability": "NEGLIGIBLE"
},
{
"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
"probability": "HIGH",
"blocked": true
}
]
}
],
"usageMetadata": {
"promptTokenCount": 752,
"candidatesTokenCount": 16,
"totalTokenCount": 768
},
"modelVersion": "gemini-2.0-flash-exp"
} 我被安全设置阻断了,用lobechat不会有相关问题。 或者用oneapi转发后的也不会

@kangfenmao
Copy link
Collaborator

REF: #696 fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants