AI service selection

To provide powerful AI functionality, AI 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 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-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 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-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 Assistant will fail to start. Refer to the configuration options guide for all the configurable environment variables.

Pricing

As you’re providing your own OpenAI API key, you’ll be subject to all the costs related to using the OpenAI or Azure OpenAI service. The following information is provided to give you a rough estimate of how much to expect this to cost.

Document ingestion

The first time you use a document with AI Assistant, it’ll be passed through an ingestion process. This involves converting the textual contents to vector embeddings, creating summary of the document, and various other classification processes.

You can expect this process to cost ~$0.005 per document, but this price can vary, depending of the amount of content in the document.

That means if you have a document with 10,000 characters, it’ll cost $0.0003. For a large document with 1,000,000 characters, it’ll cost closer to $0.01.

Chat

There are various agents embedded into AI Assistant, which means that estimating can be difficult because it’s highly dependent on user interaction.

Simple Q&A and follow-up requests

A simple question like “What is the best programming language in the world?” will result in a cost of roughly $0.0005. You may see variations of up to $0.001 and as low as $0.0001.

Similarly, expect to see a similar cost when making follow-up requests, such as “Reformat that as an email newsletter.”

Redaction

Redaction is a much more complicated process, meaning the cost is higher per request. We limit the maximum number of pages each redaction request can process to 10 pages, with the optional suggested prompt to continue processing the proceeding 10 pages. We do this to limit wasteful requests.

For a single redaction request such as “Redact all personal information from the document,” you’ll see a cost of roughly $0.008, with variations between $0.01 and $0.005.