Configuration options
You’ll likely want to customize some of AI Document Assistant’s options for your own app. Configuration options for AI Document Assistant are exposed via environment variables for the ai-document-assistant
container.
General
-
PORT
— This option determines the port where AI Document Assistant listens for traffic. By default, port4000
is used. -
GLOBAL_PATH
— Serves the AI Document Assistant service on an optional path. For example, if you setGLOBAL_PATH
to/ai
, the service will be available athttp://localhost:{PORT}/ai
. By default,GLOBAL_PATH
isn’t set.
Trust and secrets
-
ACTIVATION_KEY
— Your online license activation key. See 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, see 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][ietf rfc 7518] for details about specific algorithms. -
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 theai-document-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 isfalse
. The certificates installed in the container are used to verify the server certificate.
AI service options
For more information on the required AI services, see the Open AI service selection guide.
One of the services outlined below — either OpenAI or Azure OpenAI — is required.
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. See the Azure Quickstart guide for more information. -
AZURE_INSTANCE_NAME
— The instance name for the Azure OpenAI service. You can create an instance by following the Azure OpenAI instance guide. -
AZURE_MODEL_DEPLOYMENT_NAME
— AGPT-4o
model deployment name for the Azure OpenAI service. You can deploy models by following the Azure OpenAI deployment guide. -
AZURE_EMBEDDING_DEPLOYMENT_NAME
— Atext-embedding-3-small
embedding mode deployment name for the Azure OpenAI service. You can deploy models by following the Azure OpenAI deployment guide.
Document Engine communication options
-
DE_URL
— The URL of the Document Engine service. This is required for the AI Document 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 Document 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, aredebug
,verbose
,http
,info
,warn
, anderror
. The application will emit logs from the chosen level and all lower ones, so if the value is set toinfo
, it’ll loginfo
,warn
, anderror
. This defaults toinfo
. -
SOCKET_TRACE
— This option enables or disables the logging of socket events and data for debugging purposes. The default isfalse
. WARNING: This option logs sensitive data (user input) and should only be used for debugging purposes.