OpenAI model provider
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.
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 ...
Service configuration file
You may also customize the OpenAI models used in AI Assistant by creating a service configuration file, as explained in the model-provider configuration guide.
Our current suggestion for the OpenAI model is gpt4o-mini
, along with an embedding model of text-embedding-3-small
:
version: '1' aiServices: chat: provider: name: 'openai' apiKey: 'your-openai-api-key' # Optional model: 'gpt4o-mini' textEmbeddings: provider: name: 'openai' apiKey: 'your-openai-api-key' # Optional model: 'text-embedding-3-small'
-
provider
:-
name
: The name of the provider. Set this toopenai
. -
apiKey
: The API key for the OpenAI service. You can retrieve your keys once you’ve created an instance. See the OpenAI API key guide for more information.
-
-
model
: The name of the model you want to use. For example,gpt4o-mini
for the chat service, ortext-embedding-3-small
for the embedding service.
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 a 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.