feat: add google api safety setting

This commit is contained in:
YeungYeah
2024-06-15 12:09:58 +08:00
parent 24bf7950d8
commit 74986803db
6 changed files with 60 additions and 8 deletions

View File

@@ -72,6 +72,15 @@ export enum ServiceProvider {
Anthropic = "Anthropic",
}
// Google API safety settings, see https://ai.google.dev/gemini-api/docs/safety-settings
// BLOCK_NONE will not block any content, and BLOCK_ONLY_HIGH will block only high-risk content.
export enum GoogleSafetySettingsThreshold {
BLOCK_NONE = "BLOCK_NONE",
BLOCK_ONLY_HIGH = "BLOCK_ONLY_HIGH",
BLOCK_MEDIUM_AND_ABOVE = "BLOCK_MEDIUM_AND_ABOVE",
BLOCK_LOW_AND_ABOVE = "BLOCK_LOW_AND_ABOVE",
}
export enum ModelProvider {
GPT = "GPT",
GeminiPro = "GeminiPro",