mirror of
https://github.com/LibreChat-AI/librechat.ai.git
synced 2026-03-27 10:48:32 +07:00
⚙️ docs: GOOGLE_EXCLUDE_SAFETY_SETTINGS & CONSOLE_JSON_STRING_LENGTH (#225)
* 📘 docs: Update Google safety settings documentation and add exclusion option * 📘 docs: Add configuration option for console JSON string length truncation
This commit is contained in:
@@ -152,6 +152,7 @@ LibreChat has built-in central logging, see [Logging System](/docs/configuration
|
||||
['DEBUG_LOGGING', 'boolean', 'Keep debug logs active.','DEBUG_LOGGING=true'],
|
||||
['DEBUG_CONSOLE', 'boolean', 'Enable verbose console/stdout logs in the same format as file debug logs.', 'DEBUG_CONSOLE=false'],
|
||||
['CONSOLE_JSON', 'boolean', 'Enable verbose JSON console/stdout logs suitable for cloud deployments like GCP/AWS.', 'CONSOLE_JSON=false'],
|
||||
['CONSOLE_JSON_STRING_LENGTH', 'number', 'Configure the truncation size for console/stdout logs, defaults to 255', 'CONSOLE_JSON_STRING_LENGTH=1000'],
|
||||
]}
|
||||
/>
|
||||
|
||||
@@ -261,6 +262,7 @@ Follow these instructions to setup the [Google Endpoint](/docs/configuration/pre
|
||||
['GOOGLE_MODELS', 'string', 'Available Vertex AI Google models, separated by commas.', 'GOOGLE_MODELS=gemini-1.5-pro-preview-0409,gemini-1.0-pro-vision-001,gemini-pro,gemini-pro-vision,chat-bison,chat-bison-32k,codechat-bison,codechat-bison-32k,text-bison,text-bison-32k,text-unicorn,code-gecko,code-bison,code-bison-32k'],
|
||||
['GOOGLE_TITLE_MODEL', 'string', 'The model used for titling with Google.', 'GOOGLE_TITLE_MODEL=gemini-pro'],
|
||||
['GOOGLE_LOC', 'string', 'Specifies the Google Cloud location for processing API requests', 'GOOGLE_LOC=us-central1'],
|
||||
['GOOGLE_EXCLUDE_SAFETY_SETTINGS', 'string', 'Completely omit the safety settings that are included by default, which will use provider defaults', 'GOOGLE_EXCLUDE_SAFETY_SETTINGS=true'],
|
||||
['GOOGLE_SAFETY_SEXUALLY_EXPLICIT', 'string', 'Safety setting for sexually explicit content. Options are BLOCK_ALL, BLOCK_ONLY_HIGH, WARN_ONLY, and OFF.', 'GOOGLE_SAFETY_SEXUALLY_EXPLICIT=BLOCK_ONLY_HIGH'],
|
||||
['GOOGLE_SAFETY_HATE_SPEECH', 'string', 'Safety setting for hate speech content. Options are BLOCK_ALL, BLOCK_ONLY_HIGH, WARN_ONLY, and OFF.', 'GOOGLE_SAFETY_HATE_SPEECH=BLOCK_ONLY_HIGH'],
|
||||
['GOOGLE_SAFETY_HARASSMENT', 'string', 'Safety setting for harassment content. Options are BLOCK_ALL, BLOCK_ONLY_HIGH, WARN_ONLY, and OFF.', 'GOOGLE_SAFETY_HARASSMENT=BLOCK_ONLY_HIGH'],
|
||||
|
||||
@@ -75,3 +75,11 @@ This is not recommended however, as the outputs can be quite verbose. It's disab
|
||||
['CONSOLE_JSON', 'boolean', 'Enable verbose JSON console/stdout logs suitable for cloud deployments like GCP/AWS.', 'CONSOLE_JSON=false'],
|
||||
]}
|
||||
/>
|
||||
|
||||
By default, the JSON string length is truncated to 255 characters. You can configure this with the following environment variable:
|
||||
|
||||
<OptionTable
|
||||
options={[
|
||||
['CONSOLE_JSON_STRING_LENGTH', 'number', 'Configure the truncation size for console/stdout logs, defaults to 255', 'CONSOLE_JSON_STRING_LENGTH=1000'],
|
||||
]}
|
||||
/>
|
||||
|
||||
@@ -117,9 +117,9 @@ services:
|
||||
```
|
||||
</Callout>
|
||||
|
||||
## Vertex AI Safety Settings
|
||||
## Google Safety Settings
|
||||
|
||||
To set safety settings for Vertex AI, you can set the following in your .env file:
|
||||
To set safety settings for both Vertex AI and Generative Language API, you can set the following in your .env file:
|
||||
|
||||
```bash filename=".env"
|
||||
GOOGLE_SAFETY_SEXUALLY_EXPLICIT=BLOCK_ONLY_HIGH
|
||||
@@ -128,6 +128,12 @@ GOOGLE_SAFETY_HARASSMENT=BLOCK_ONLY_HIGH
|
||||
GOOGLE_SAFETY_DANGEROUS_CONTENT=BLOCK_ONLY_HIGH
|
||||
```
|
||||
|
||||
You can also exclude safety settings by setting the following in your .env file, which will use the provider defaults. This can be helpful if you are having issues with specific safety settings.
|
||||
|
||||
```bash filename=".env"
|
||||
GOOGLE_EXCLUDE_SAFETY_SETTINGS=true
|
||||
```
|
||||
|
||||
NOTE: You do not have access to the BLOCK_NONE setting by default.
|
||||
To use this restricted `HarmBlockThreshold` setting, you will need to either:
|
||||
- (a) Get access through an allowlist via your Google account team
|
||||
|
||||
Reference in New Issue
Block a user