Initialize and Configure the AI Content Assistant Using Properties Files

This page describes how to set up and configure the AI Content Assistant using properties files in your project.

Info: The AI Content Assistant is available only to users assigned the xm.chatbot.user role.

Info: If you are upgrading to version 16.6 or 16.8, review the AI Module upgrade instructions.

Installation

Add the following dependencies to your project's cms-dependencies POM file:

<dependency> <groupId>com.bloomreach.xm.ai</groupId> <artifactId>content-ai-service-impl-incubating</artifactId> </dependency>
<dependency> <groupId>com.bloomreach.xm.ai</groupId> <artifactId>content-ai-service-rest-incubating</artifactId> </dependency>
<dependency> <groupId>com.bloomreach.xm.ai</groupId> <artifactId>content-ai-service-client-bootstrap</artifactId> </dependency>
<dependency> <groupId>com.bloomreach.xm.ai</groupId> <artifactId>content-ai-service-client-assistant-angular</artifactId> </dependency>

Configure Using Properties Files

Configure the Content Assistant for production by specifying properties in one or more of the following locations. Properties are resolved in order of precedence (highest to lowest):

  1. System properties set on the command line
  2. A properties file named xm-ai-service.properties available on the classpath
  3. The project's platform.properties file

Info: For more details on managing properties files and system properties:

Multiple Configurations

You can define configuration for multiple model providers and vector stores in properties files. Only one provider can be active at a time.

Global Configuration Options

Set the active model provider using the brxm.ai.provider property. Supported values:

  • OpenAI
  • GoogleGenAiVertex
  • Ollama
  • LiteLLM

Info: If you set brxm.ai.provider to an empty value, all AI backend services are disabled, including the Vector Store and Ingestion process.

Additional global properties:

  • brxm.ai.chat.max-messages: Sets the maximum number of messages per conversation. Accepts an integer. Default is 100.
  • brxm.ai.chat.pdf.max-size-bytes: Sets the maximum allowed PDF size (in bytes) for reference in a conversation. Accepts an integer. Default is 1MB (1048576 bytes).
  • brxm.ai.tools.search.max-results: Sets the maximum number of search results returned by the assistant. Accepts an integer between 1 and 20. Default is 5. Values outside this range or non-numeric values are logged as errors and disable search functionality in the assistant.

Model Provider Configuration

Configure provider-specific properties as required for your selected model provider. Only one embedding model can be registered. If no embedding model is configured, the Vector Store and Ingestion process will not initialize.

OpenAI

Info: You need an OpenAI API key to use ChatGPT models. Register at the OpenAI signup page and generate an API key on the API Keys page.

PropertyRequiredTypeDescriptionDefaultExample
spring.ai.openai.api.urlyesurlOpenAI endpointhttps://api.openai.com/v1
spring.ai.openai.api_keyyesstringOpenAI API key
spring.ai.openai.chat.options.modelyesmodel nameOpenAI-supported model. See modelsgpt-4o
spring.ai.openai.chat.options.temperaturenodoubleModel temperature (controls response randomness). Lower values recommended.0.00.1
spring.ai.openai.chat.options.maxTokensnointegerMaximum tokens per conversation409615000
spring.ai.openai.embedding.options.modelnomodel nameOpenAI embeddings modelLatest OpenAI embeddings modeltext-embedding-3-large
spring.ai.openai.embedding.options.dimensionsnointegerOutput embedding dimensions (supported in text-embedding-3 and later)Depends on model (e.g., 3072 for text-embedding-3-large)1024
spring.ai.openai.embedding.options.encoding-formatnostringEmbedding format: float or base64floatbase64

GoogleGenAiVertex

Info: To authenticate with VertexAI, configure Application Default Credentials (ADC) using the ADC setup guide.

PropertyRequiredTypeDescriptionDefaultExample
spring.ai.google.genai.project-idyesstringGoogle Cloud Platform project IDmyprojectid
spring.ai.google.genai.locationyesstringGoogle Cloud Platform regionmylocation
spring.ai.google.genai.chat.modelyesmodel nameGoogle GenAI Chat modelgemini-3.5-flash
spring.ai.google.genai.chat.temperaturenodoubleModel temperature (controls response randomness). Lower values recommended.0.00.3
spring.ai.google.genai.chat.max-output-tokensnointegerMaximum tokens per conversation409615000
spring.ai.vertex.ai.embedding.project-idnostringGoogle Cloud Platform project IDmyprojectid
spring.ai.vertex.ai.embedding.locationnostringGoogle Cloud Platform regionmylocation
spring.ai.vertex.ai.embedding.text.options.modelnomodel nameGoogle GenAI Text Embedding modeltext-embedding-004
spring.ai.vertex.ai.embedding.text.options.dimensionsnointegerOutput embedding dimensions (supported for model version 004 and later)Depends on model1024
spring.ai.vertex.ai.embedding.text.options.auto-truncatenobooleanTruncate input text if set to truetruefalse

Ollama

Info: Ollama can be downloaded and run locally.

Ollama does not currently support tool calling (last tested with gemma3).

PropertyRequiredTypeDescriptionDefaultExample
spring.ai.ollama.api.urlyesurlOllama endpointhttps://myollama/
spring.ai.ollama.chat.options.modelyesmodel nameOllama model. See supported modelsgemma3
spring.ai.ollama.chat.options.model.pull.strategyyesenumModel pull strategy at startupWHEN_MISSING
spring.ai.ollama.embedding.options.modelnomodel nameSupported embedding modelnomic-embed-text
spring.ai.ollama.embedding.options.truncatenobooleanTruncate input to fit context lengthtruefalse

LiteLLM

Info: LiteLLM is a model gateway. You can install it locally or use a managed service.

PropertyRequiredTypeDescriptionDefaultExample
spring.ai.litellm.api.urlyesurlLiteLLM endpointhttps://mylitellm/
spring.ai.litellm.api_keyyesstringLiteLLM API key
spring.ai.litellm.chat.options.modelyesmodel nameEnabled model name in LiteLLMopenai/gpt-4o
spring.ai.litellm.chat.options.temperaturenodoubleModel temperature (controls response randomness). Lower values recommended.0.00.1
spring.ai.litellm.chat.options.max-tokensnointegerMaximum tokens per conversation409615000
spring.ai.litellm.embedding.options.modelnomodel nameEnabled embeddings model in LiteLLMLatest provider embeddings modelopenai/text-embedding-3-large
spring.ai.litellm.embedding.options.dimensionsnointegerOutput embedding dimensionsDepends on model1024
spring.litellm.openai.embedding.options.encoding-formatnostringEmbedding format: float or base64floatbase64

Vector Store and Ingestion Configuration

For details on configuring the Vector Store and Ingestion, see Initialize and configure the Vector Store and Ingestion.

Maintenance Scripts

The AI module provides Groovy scripts for maintaining your Vector Store. For more information, see Maintenance Groovy Scripts.

Share Feedback
Page: /content-ai/setup-configuration/initialize-and-configure-via-properties
Section: Content AI
Category *
Setup via Properties (Production) | Bloomreach Content Documentation