Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt

Use this file to discover all available pages before exploring further.

This guide explains how to configure OpenAI as the Large Language Model (LLM) provider for Atoti Intelligence.

What is OpenAI?

Compatible APIs

Many LLMs now support the OpenAI API format. There is a high chance that a chosen model is compatible with this API.

Prerequisites

Before configuring OpenAI, ensure the following requirements are met:
  • An OpenAI account with API access (or compatible provider)
  • OpenAI API key

Add the dependency

Add the Spring AI OpenAI dependency to the project. Add the following to pom.xml:
<dependency>
  <groupId>org.springframework.ai</groupId>
  <artifactId>spring-ai-starter-model-openai</artifactId>
</dependency>

Configure the model

Configure the OpenAI model in the application configuration file. This example assumes that LLM_API_KEY is passed as an environment variable or JVM argument. Add the following to application.yaml:
spring:
  ai:
    openai:
      api-key: ${LLM_API_KEY}
      chat:
        options:
          model: gpt-3.5-turbo
          temperature: 0.
          maxTokens: 5000
Replace the following placeholders:
  • Model name: Choose an available OpenAI model
Please refer to the Spring AI documentation for any additional configuration options.

Verify the configuration

After completing the configuration, verify that the LLM connection works:
  1. Start the Atoti application
  2. Check the application logs for successful LLM initialization
  3. Test an AI feature such as Visualize This or Auto-Explain
After configuring OpenAI, proceed to set up AI features: