Docker configuration

You’ll likely want to customize some of AI Assistant’s options for your app. While some AI model-specific options are set in the service configuration file, this guide will focus on configuration options for AI Assistant that are exposed via environment variables for the ai-assistant container. These include endpoints for AI services, database connection details, logging options, and key setting.

General

  • PORT — Determines the port where AI Assistant listens for traffic. By default, port 4000 is used.

Trust and secrets

  • ACTIVATION_KEY — Your online license activation key. Refer to the product activation guide for more details.

  • API_AUTH_TOKEN — A string used for authenticating with the server API. Choose a sufficiently long random string for this option to prevent unauthorized access to the API.

  • JWT_PUBLIC_KEY — This is the public key used to verify the JSON Web Token (JWT) payload signature required for client communication. Ensure that this public key corresponds to the private key used to generate JWTs in your app. For more information, refer to the authentication guide.

  • JWT_ALGORITHM — The algorithm used for JWT verification. This should be the same as the one you’ll use for signing JWTs in your app. Supported algorithms: RS256, RS512, ES256, ES512. See RFC 7518 for details about specific algorithms.

  • SECRET_KEY_BASE — A string used as the base key for deriving secret keys for the purposes of authentication. Choose a sufficiently long random string for this option. To generate a random string, use openssl rand -hex 256.

  • DASHBOARD_USERNAME, DASHBOARD_PASSWORD — The username and password to access the dashboard. To disable the dashboard, leave these unset.

Database options

  • PGUSER, PGPASSWORD, PGDATABASE, PGHOST, PGPORT — These options determine how the ai-assistant service will communicate with your database service.

  • PGSSL — A Boolean string that can be used to enable connection to a PostgreSQL instance that supports encrypted SSL connections. The default is false. The certificates installed in the container are used to verify the server certificate.

AI service options

  • FORCE_EMBEDDING_MIGRATE — This option forces a database migration to be compatible with a new embedding model. This will result in a loss of all the ingested document data in the DB, and it should only be used in development, or if you’re certain you want to migrate to a new model.

The following options are model-provider specific. For more information on setting up the model providers for AI Assistant, refer to the model-provider configuration guide.

OpenAI

  • OPENAI_API_KEY — The API key for the OpenAI service. You can create an API key by following the OpenAI API key guide.

Azure OpenAI

  • AZURE_API_KEY — The API key for the Azure OpenAI service. You can retrieve your keys once you’ve created an instance. Refer to the Azure quickstart guide for more information.

Note: AZURE_INSTANCE_NAME, AZURE_MODEL_DEPLOYMENT_NAME, and AZURE_EMBEDDING_DEPLOYMENT_NAME were all deprecated in AI Assistant 1.1. To configure these options, refer to the Azure provider guide.

AWS Bedrock

  • BEDROCK_ACCESS_KEY_ID — The access key ID for the AWS Bedrock service. You can retrieve your access key ID when you’ve created an IAM user. Refer to the AWS Bedrock getting started guide for more information.

  • BEDROCK_SECRET_ACCESS_KEY — The secret access key for the AWS Bedrock service. You can retrieve your secret access key when you’ve created an IAM user. Refer to the AWS Bedrock getting started guide for more information.

OpenAI API compatible

  • OPENAI_COMPAT_API_KEY — An optional API key if your inference framework requires it.

Document Engine communication options

  • DE_URL — The URL of the Document Engine service. This is required for the AI Assistant to communicate with Document Engine.

  • DE_API_AUTH_TOKEN — The secret used to authenticate with the Document Engine service. This is required for AI Assistant to communicate with Document Engine.

Logging and monitoring options

  • LOG_LEVEL — This option defines a minimum log level. The allowed values, from higher to lower, are debug, verbose, http, info, warn, and error. The application will emit logs from the chosen level and all lower ones, so if the value is set to info, it’ll log info, warn, and error. This defaults to info.

  • SOCKET_TRACE — This option enables or disables the logging of socket events and data for debugging purposes. The default is false. WARNING: This option logs sensitive data (user input) and should only be used for debugging purposes.