genai.ini#
As genai is a containerized service, the configuration does not rely on providing a genai.ini file. Instead, the configuration is provided through environment variables that are made available to the container.
Notes for administrators
A
/etc/squirro/genai.inifile exists in most Squirro deployments, but it should not be used to configure the service.Version 3.13.0 includes breaking changes that may require adjustments if you are upgrading from an earlier version. Learn more
Environment variables allow you to customize how the GenAI Docker image behaves and connects to external services. Some of these variables are mandatory. If they are not set or are misconfigured, the service may fail to start or function correctly.
Variable Name |
Type |
Required |
Description |
Example Value |
|---|---|---|---|---|
SQ_DATABASE_URL |
string |
Yes |
Database URL for the GenAI service (supports pymysql, psycopg2 and sqlite connectors). |
|
SQ_TOPIC_API_ENDPOINT |
string |
Yes |
Endpoint for the Squirro topic API. |
|
SQ_USER_API_ENDPOINT |
string |
Yes |
Endpoint for the Squirro user API. |
|
SQ_USER_SERVICE_CLIENT_ID |
string |
Yes |
Value of the genai.client_id configuration in the [clients] section of the Squirro platform user.ini. Required to run query processing. |
|
SQ_USER_SERVICE_CLIENT_SECRET |
string |
Yes |
Value of the genai.client_secret configuration in the [clients] section of the Squirro platform user.ini. Required to run query processing. |
|
SQ_CLUSTER |
string |
Yes (for remote clusters) |
Fallback Squirro cluster URL, used if it is not specified in the request. Default value is http://localhost. |
|
SQ_SECURITY_WORKSPACES |
boolean |
Yes |
Value of the workspaces configuration in the [security] section of Squirro platform common.ini. Should have the same value across all Squirro services. |
|
SQ_DECRYPT_COMMAND |
string |
No |
Path to the command that resolves the |
|
SQ_LOG_LEVEL |
string |
No |
Log level for the |
|
SQ_CA_FILE |
string |
No |
Path to file containing certificates that should be added to the container. |
|
SQ_DATABASE_SSL_CA |
string |
No |
Path to file containing certificates that should be added to the database connection (alternative to setting the file in |
|
SQ_REDIS_CACHE_HOST |
string |
No |
Redis server host used for caching (if not specified, some caching may not be performed). |
|
SQ_REDIS_CACHE_PORT |
int |
No |
(see above) |
|
SQ_REDIS_CACHE_PASSWORD |
string |
No |
(see above) |
|
SQ_REDIS_CACHE_DB |
int |
No |
(see above) |
|
SQUIRRO_REFRESH_TOKEN |
string |
No |
Fallback refresh token, used if it is not specified in the request. |
|
SQUIRRO_PROJECT_ID |
string |
No |
Fallback project ID, used if it is not specified in the request. |
|
SQUIRRO_SEARCH_MODE |
string |
No |
Fallback search mode, used if it is not specified in the request. |
|
SQ_OPENAI_API_KEY, OPENAI_API_KEY |
string |
No |
Fallback API key for OpenAI LLM API, used if it is not specified in the request. |
|
SQ_AZURE_API_KEY, AZURE_API_KEY |
string |
No |
Fallback API key for Azure LLM API, used if it is not specified in the request. |
|
SQ_ANYSCALE_API_KEY |
string |
No |
Fallback API key for Anyscale LLM API, used if it is not specified in the request. |
|
SQ_LLAMA_API_KEY |
string |
No |
Fallback API key for LLAMA LLM API, used if it is not specified in the request. |
|
SQ_GOOGLE_API_KEY, GOOGLE_API_KEY |
string |
No |
Fallback API key for Google LLM (Gemini) API, used if it is not specified in the request. |
|
SQ_CEREBRAS_API_KEY |
string |
No |
Fallback API key for Cerebras LLM API, used if it is not specified in the request. |
|
SQ_BRAVE_API_KEY |
string |
No |
Fallback API key for Brave-related tools, used if it is not specified in the request. |
|
OPENAI_MODEL |
string |
No |
Fallback OpenAI model, used if it is not specified in the request. |
|
SQ_DISABLE_AUTHENTICATION |
string |
No |
For testing pruposes only - If set to |
|
SQ_ROOT_PATH |
string |
No |
|
|
SQ_GENAI_AUTO_POPULATE_DEFAULT_AGENTS |
string |
No |
If set to |
|
SQ_GENAI_TELEMETRY_ENABLED |
string |
No |
Global switch to disable telemetry system for debugging and monitoring query execution patterns. Set to |
|
SQ_LLM_RATE_LIMIT_ERROR_MESSAGE |
string |
No |
Error message to return when the rate limit is exceeded. |
|
SQ_GENERIC_ERROR_MESSAGE |
string |
No |
Error message to return when an error occurs. |
|
DEFAULT_PERSONA |
string |
No |
Overrides the default persona. |
|
DEFAULT_USER_PROMPT_EXTRA |
string |
No |
Overrides the default user prompt instructions that define behavioral rules and constraints for agents. |
|
DEFAULT_ASSISTANT_LANG_INSTRUCTION |
string |
No |
Overrides the default language instructions for agent responses. |
|
DEFAULT_RETRIEVAL_LANG_INSTRUCTION |
string |
No |
Overrides the default language instructions for retrieval queries. |
|
Setting Environment Variables#
Set environment variables for the GenAI service by creating a docker-override.env file in the /etc/squirro/genai.d/ directory. That approach ensures that environment variables are preserved and continue to work as expected after updates or upgrades of Squirro components.
Steps:
Create the
docker-override.envfile if it does not already exist.sudo touch /etc/squirro/genai.d/docker-override.env
Add environment variables to the file in the format
VARIABLE_NAME=VALUEwithout spaces around the equal sign.DEFAULT_PERSONA="You are a specialized financial AI assistant with expertise in market analysis."
Ensure the file is owned by the
sqgenaiuser.sudo chown sqgenai:squirro /etc/squirro/genai.d/docker-override.env
Restart the GenAI service.
sudo systemctl restart sqgenaid