AI Service Selection

To provide powerful AI functionality, AI Document Assistant requires access to OpenAI models. As part of the setup, you’ll be asked to provide either an OpenAI API key or Azure OpenAI service details to enable AI Document Assistant to communicate with an OpenAI service.

OpenAI

Using the OpenAI API service is the simplest way to get set up. This service offers a wide range of configurations to track cost, throttle usage, and manage access, depending on your needs. If you’re in the testing stage, we strongly recommend starting with OpenAI.

Information

The OpenAI API has attained SOC 2 Type 2 compliance (see the official announcement).

To get started, you’ll need to create an API key by following the OpenAI API key guide.

Next, use the API key you’ve created to set the OPENAI_API_KEY environment variable in your Docker Compose file, or on the command line when using Docker directly. See the configuration options guide for more information about environment variables:

services:
  ai-document-assistant:
    environment:
      - OPENAI_API_KEY=your-openai-api-key
  ...

Azure OpenAI

Azure OpenAI is a great option if you’re looking for more advanced configuration options and data privacy. With this advanced configuration comes more complexity in setup, so choose wisely.

Information

The Azure OpenAI service can be used in a HIPAA-compliant manner.

To use Azure OpenAI with AI Document Assistant, you’ll need the following information:

  • 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 — A GPT-4o model deployment name for the Azure OpenAI service. You can deploy models by following the Azure OpenAI deployment guide.

  • AZURE_EMBEDDING_DEPLOYMENT_NAME — A text-embedding-3-small embedding mode deployment name for the Azure OpenAI service. You can deploy models by following the Azure OpenAI deployment guide.

services:
  ai-document-assistant:
    environment:
      - AZURE_API_KEY=your-azure-api-key
      - AZURE_INSTANCE_NAME=your-azure-instance-name
      - AZURE_MODEL_DEPLOYMENT_NAME=your-azure-model-deployment-name
      - AZURE_EMBEDDING_DEPLOYMENT_NAME=your-azure-embedding-deployment-name
  ...

All these environment variables must be set to use Azure OpenAI. Otherwise, AI Document Assistant will fail to start. Refer to the configuration options guide for all the configurable environment variables.