2
Home
gitea_admin edited this page 2026-10-12 05:39:31 +00:00
Table of Contents
OpenAI
OpenAI endpoint for chat completion and embeddings.
Metadata
| Property | Value |
|---|---|
| Scheme | openai |
| Support Level | Stable |
| Labels | ai |
| Version | 4.20.0 (CEQ 3.36.0) |
Maven Dependency
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-openai</artifactId>
<version>4.20.0 (CEQ 3.36.0)</version>
</dependency>
Endpoint Properties
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
operation |
enum | ✓ | The operation to perform: 'chat-completion', 'embeddings', or 'tool-execution' | |
additionalBodyProperty |
object | Additional JSON properties to include in the request body (e.g. additionalBodyProperty.traceId=123). This is a multi-value option with prefix: additionalBodyProperty. | ||
apiKey |
string | OpenAI API key. Can also be set via OPENAI_API_KEY environment variable. | ||
autoToolExecution |
boolean | true |
When true and MCP servers are configured, automatically execute tool calls and loop back to the model. When false, tool calls are returned as the message body for manual handling. | |
baseUrl |
string | https://api.openai.com/v1 |
Base URL for OpenAI API. Defaults to OpenAI's official endpoint. Can be used for local or third-party providers. | |
conversationHistoryProperty |
string | CamelOpenAIConversationHistory |
Exchange property name for storing conversation history | |
conversationMemory |
boolean | false |
Enable conversation memory per Exchange | |
developerMessage |
string | Developer message to prepend before user messages | ||
dimensions |
integer | Number of dimensions for the embedding output. Only supported by text-embedding-3 models. Reducing dimensions can lower costs and improve performance without significant quality loss. | ||
embeddingModel |
string | The model to use for embeddings | ||
encodingFormat |
enum | base64 |
The format for embedding output: 'float' for list of floats, 'base64' for compressed format | |
jsonSchema |
string | JSON schema for structured output validation | ||
maxTokens |
integer | Maximum number of tokens to generate | ||
maxToolIterations |
integer | 50 |
Maximum number of tool call loop iterations to prevent infinite loops | |
mcpProtocolVersions |
string | Comma-separated list of MCP protocol versions to advertise when connecting to MCP servers using Streamable HTTP transport. When not set, the SDK default is used. Example: 2024-11-05,2025-03-26,2025-06-18 | ||
mcpReconnect |
boolean | true |
Automatically reconnect to MCP servers when a tool call fails due to a transport error, and retry the call once. | |
mcpServer |
object | MCP (Model Context Protocol) server configurations. Define servers using prefix notation: mcpServer..transportType=stdiossestreamableHttp, mcpServer..command= (stdio), mcpServer..args= (stdio), mcpServer..url= (sse/streamableHttp), mcpServer..oauthProfile= (OAuth profile for HTTP auth, requires camel-oauth). This is a multi-value option with prefix: mcpServer. | ||
mcpTimeout |
integer | 20 |
Timeout in seconds for MCP tool call requests. Applies to all MCP operations including tool execution and initialization. | |
model |
string | The model to use for chat completion | ||
outputClass |
string | Fully qualified class name for structured output using response format | ||
storeFullResponse |
boolean | false |
Store the full response in the exchange property 'CamelOpenAIResponse' in non-streaming mode | |
streaming |
boolean | false |
Enable streaming responses | |
systemMessage |
string | System message to prepend. When set and conversationMemory is enabled, the conversation history is reset. | ||
temperature |
number | Temperature for response generation (0.0 to 2.0) | ||
topP |
number | Top P for response generation (0.0 to 1.0) | ||
userMessage |
string | Default user message text to use when no prompt is provided | ||
lazyStartProducer |
boolean | false |
Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. | |
oauthProfile |
string | OAuth profile name for obtaining an access token via the OAuth 2.0 Client Credentials grant. When set, the token is acquired from the configured identity provider and used instead of apiKey. Requires camel-oauth on the classpath. The profile properties are resolved from camel.oauth..client-id, camel.oauth..client-secret, and camel.oauth..token-endpoint. | ||
sslContextParameters |
object | SSLContextParameters to use for configuring SSL/TLS. When set, takes precedence over the individual sslTruststore, sslKeystore, and sslProtocol options. | ||
sslEndpointAlgorithm |
string | https |
The endpoint identification algorithm to validate the server hostname using the server certificate. Set to an empty string or 'none' to disable hostname verification | |
sslKeymanagerAlgorithm |
string | SunX509 |
The algorithm used by the key manager factory for SSL connections | |
sslKeyPassword |
string | The password of the private key in the key store file | ||
sslKeystoreLocation |
string | The location of the key store file. This is optional and can be used for two-way authentication for the OpenAI API | ||
sslKeystorePassword |
string | The store password for the key store file | ||
sslKeystoreType |
string | JKS |
The file format of the key store file | |
sslProtocol |
string | TLSv1.3 |
The SSL protocol used to generate the SSLContext | |
sslTrustmanagerAlgorithm |
string | PKIX |
The algorithm used by the trust manager factory for SSL connections | |
sslTruststoreLocation |
string | The location of the trust store file, used to validate the server's certificate | ||
sslTruststorePassword |
string | The password for the trust store file. If a password is not set, the configured trust store can still be used, but integrity checking is disabled | ||
sslTruststoreType |
string | JKS |
The file format of the trust store file |