Interface SpringAiChatEndpointBuilderFactory.AdvancedSpringAiChatEndpointBuilder
- All Superinterfaces:
org.apache.camel.builder.EndpointProducerBuilder,org.apache.camel.EndpointProducerResolver
- Enclosing interface:
SpringAiChatEndpointBuilderFactory
public static interface SpringAiChatEndpointBuilderFactory.AdvancedSpringAiChatEndpointBuilder
extends org.apache.camel.builder.EndpointProducerBuilder
Advanced builder for endpoint for the Spring AI Chat component.
-
Method Summary
Modifier and TypeMethodDescriptionList of custom advisors to add to the ChatClient.List of custom advisors to add to the ChatClient.basic()chatMemory(String chatMemory) ChatMemory instance for maintaining conversation history across requests.chatMemory(org.springframework.ai.chat.memory.ChatMemory chatMemory) ChatMemory instance for maintaining conversation history across requests.chatMemoryVectorStore(String chatMemoryVectorStore) VectorStore instance for maintaining conversation history using semantic search.chatMemoryVectorStore(org.springframework.ai.vectorstore.VectorStore chatMemoryVectorStore) VectorStore instance for maintaining conversation history using semantic search.entityClass(Class<Object> entityClass) The Java class to use for entity response conversion using ChatClient.entity(Class).entityClass(String entityClass) The Java class to use for entity response conversion using ChatClient.entity(Class).lazyStartProducer(boolean lazyStartProducer) Whether the producer should be started lazy (on the first message).lazyStartProducer(String lazyStartProducer) Whether the producer should be started lazy (on the first message).maxFileSize(long maxFileSize) Maximum file size in bytes for multimodal content (images, audio, PDFs, etc.).maxFileSize(String maxFileSize) Maximum file size in bytes for multimodal content (images, audio, PDFs, etc.).Maximum tokens in the response.Maximum tokens in the response.outputClass(Class<Object> outputClass) The Java class to use for BEAN output format conversion.outputClass(String outputClass) The Java class to use for BEAN output format conversion.outputFormat(String outputFormat) The output format for structured output conversion (BEAN, MAP, LIST).safeguardOrder(Integer safeguardOrder) Order of execution for SafeGuard advisor.safeguardOrder(String safeguardOrder) Order of execution for SafeGuard advisor.structuredOutputConverter(String structuredOutputConverter) A StructuredOutputConverter for converting the chat response to structured output (e.g., BeanOutputConverter, MapOutputConverter, ListOutputConverter).structuredOutputConverter(org.springframework.ai.converter.StructuredOutputConverter<Object> structuredOutputConverter) A StructuredOutputConverter for converting the chat response to structured output (e.g., BeanOutputConverter, MapOutputConverter, ListOutputConverter).systemMetadata(String systemMetadata) Metadata to attach to system messages.systemMetadata(Map<String, Object> systemMetadata) Metadata to attach to system messages.temperature(Double temperature) Temperature parameter for response randomness (0.0-2.0).temperature(String temperature) Temperature parameter for response randomness (0.0-2.0).topKSampling(Integer topKSampling) Top K parameter for sampling.topKSampling(String topKSampling) Top K parameter for sampling.Top P parameter for nucleus sampling.Top P parameter for nucleus sampling.userMetadata(String userMetadata) Metadata to attach to user messages.userMetadata(Map<String, Object> userMetadata) Metadata to attach to user messages.Methods inherited from interface org.apache.camel.builder.EndpointProducerBuilder
doSetMultiValueProperties, doSetMultiValueProperty, doSetProperty, expr, getRawUriMethods inherited from interface org.apache.camel.EndpointProducerResolver
resolve, resolve
-
Method Details
-
basic
-
lazyStartProducer
default SpringAiChatEndpointBuilderFactory.AdvancedSpringAiChatEndpointBuilder lazyStartProducer(boolean lazyStartProducer) 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. The option is a:booleantype. Default: false Group: producer (advanced)- Parameters:
lazyStartProducer- the value to set- Returns:
- the dsl builder
-
lazyStartProducer
default SpringAiChatEndpointBuilderFactory.AdvancedSpringAiChatEndpointBuilder lazyStartProducer(String lazyStartProducer) 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. The option will be converted to abooleantype. Default: false Group: producer (advanced)- Parameters:
lazyStartProducer- the value to set- Returns:
- the dsl builder
-
advisors
default SpringAiChatEndpointBuilderFactory.AdvancedSpringAiChatEndpointBuilder advisors(List<org.springframework.ai.chat.client.advisor.api.Advisor> advisors) List of custom advisors to add to the ChatClient. These advisors will be added after the built-in advisors (SimpleLogger, SafeGuard, ChatMemory, QuestionAnswer) in the order they are provided in the list. The option is a:java.util.List<org.springframework.ai.chat.client.advisor.api.Advisor>type. Group: advanced- Parameters:
advisors- the value to set- Returns:
- the dsl builder
-
advisors
default SpringAiChatEndpointBuilderFactory.AdvancedSpringAiChatEndpointBuilder advisors(String advisors) List of custom advisors to add to the ChatClient. These advisors will be added after the built-in advisors (SimpleLogger, SafeGuard, ChatMemory, QuestionAnswer) in the order they are provided in the list. The option will be converted to ajava.util.List<org.springframework.ai.chat.client.advisor.api.Advisor>type. Group: advanced- Parameters:
advisors- the value to set- Returns:
- the dsl builder
-
chatMemory
default SpringAiChatEndpointBuilderFactory.AdvancedSpringAiChatEndpointBuilder chatMemory(org.springframework.ai.chat.memory.ChatMemory chatMemory) ChatMemory instance for maintaining conversation history across requests. When provided, conversation context will be automatically managed using MessageChatMemoryAdvisor. The option is a:org.springframework.ai.chat.memory.ChatMemorytype. Group: advanced- Parameters:
chatMemory- the value to set- Returns:
- the dsl builder
-
chatMemory
default SpringAiChatEndpointBuilderFactory.AdvancedSpringAiChatEndpointBuilder chatMemory(String chatMemory) ChatMemory instance for maintaining conversation history across requests. When provided, conversation context will be automatically managed using MessageChatMemoryAdvisor. The option will be converted to aorg.springframework.ai.chat.memory.ChatMemorytype. Group: advanced- Parameters:
chatMemory- the value to set- Returns:
- the dsl builder
-
chatMemoryVectorStore
default SpringAiChatEndpointBuilderFactory.AdvancedSpringAiChatEndpointBuilder chatMemoryVectorStore(org.springframework.ai.vectorstore.VectorStore chatMemoryVectorStore) VectorStore instance for maintaining conversation history using semantic search. When provided, conversation context will be automatically managed using VectorStoreChatMemoryAdvisor. This is an alternative to chatMemory that uses vector embeddings for long-term memory with semantic retrieval. The option is a:org.springframework.ai.vectorstore.VectorStoretype. Group: advanced- Parameters:
chatMemoryVectorStore- the value to set- Returns:
- the dsl builder
-
chatMemoryVectorStore
default SpringAiChatEndpointBuilderFactory.AdvancedSpringAiChatEndpointBuilder chatMemoryVectorStore(String chatMemoryVectorStore) VectorStore instance for maintaining conversation history using semantic search. When provided, conversation context will be automatically managed using VectorStoreChatMemoryAdvisor. This is an alternative to chatMemory that uses vector embeddings for long-term memory with semantic retrieval. The option will be converted to aorg.springframework.ai.vectorstore.VectorStoretype. Group: advanced- Parameters:
chatMemoryVectorStore- the value to set- Returns:
- the dsl builder
-
entityClass
default SpringAiChatEndpointBuilderFactory.AdvancedSpringAiChatEndpointBuilder entityClass(Class<Object> entityClass) The Java class to use for entity response conversion using ChatClient.entity(Class). When specified, the response will be automatically converted to this type instead of returning a String. The option is a:java.lang.Class<java.lang.Object>type. Group: advanced- Parameters:
entityClass- the value to set- Returns:
- the dsl builder
-
entityClass
default SpringAiChatEndpointBuilderFactory.AdvancedSpringAiChatEndpointBuilder entityClass(String entityClass) The Java class to use for entity response conversion using ChatClient.entity(Class). When specified, the response will be automatically converted to this type instead of returning a String. The option will be converted to ajava.lang.Class<java.lang.Object>type. Group: advanced- Parameters:
entityClass- the value to set- Returns:
- the dsl builder
-
maxFileSize
default SpringAiChatEndpointBuilderFactory.AdvancedSpringAiChatEndpointBuilder maxFileSize(long maxFileSize) Maximum file size in bytes for multimodal content (images, audio, PDFs, etc.). Files exceeding this size will be rejected with an exception. Default is 1048576 bytes (1MB). Set to 0 to disable size checking (not recommended). The option is a:longtype. Default: 1048576 Group: advanced- Parameters:
maxFileSize- the value to set- Returns:
- the dsl builder
-
maxFileSize
default SpringAiChatEndpointBuilderFactory.AdvancedSpringAiChatEndpointBuilder maxFileSize(String maxFileSize) Maximum file size in bytes for multimodal content (images, audio, PDFs, etc.). Files exceeding this size will be rejected with an exception. Default is 1048576 bytes (1MB). Set to 0 to disable size checking (not recommended). The option will be converted to alongtype. Default: 1048576 Group: advanced- Parameters:
maxFileSize- the value to set- Returns:
- the dsl builder
-
maxTokens
default SpringAiChatEndpointBuilderFactory.AdvancedSpringAiChatEndpointBuilder maxTokens(Integer maxTokens) Maximum tokens in the response. The option is a:java.lang.Integertype. Group: advanced- Parameters:
maxTokens- the value to set- Returns:
- the dsl builder
-
maxTokens
default SpringAiChatEndpointBuilderFactory.AdvancedSpringAiChatEndpointBuilder maxTokens(String maxTokens) Maximum tokens in the response. The option will be converted to ajava.lang.Integertype. Group: advanced- Parameters:
maxTokens- the value to set- Returns:
- the dsl builder
-
outputClass
default SpringAiChatEndpointBuilderFactory.AdvancedSpringAiChatEndpointBuilder outputClass(Class<Object> outputClass) The Java class to use for BEAN output format conversion. Required when outputFormat is BEAN. The option is a:java.lang.Class<java.lang.Object>type. Group: advanced- Parameters:
outputClass- the value to set- Returns:
- the dsl builder
-
outputClass
default SpringAiChatEndpointBuilderFactory.AdvancedSpringAiChatEndpointBuilder outputClass(String outputClass) The Java class to use for BEAN output format conversion. Required when outputFormat is BEAN. The option will be converted to ajava.lang.Class<java.lang.Object>type. Group: advanced- Parameters:
outputClass- the value to set- Returns:
- the dsl builder
-
outputFormat
default SpringAiChatEndpointBuilderFactory.AdvancedSpringAiChatEndpointBuilder outputFormat(String outputFormat) The output format for structured output conversion (BEAN, MAP, LIST). Used in conjunction with outputClass for BEAN format. The option is a:java.lang.Stringtype. Group: advanced- Parameters:
outputFormat- the value to set- Returns:
- the dsl builder
-
structuredOutputConverter
default SpringAiChatEndpointBuilderFactory.AdvancedSpringAiChatEndpointBuilder structuredOutputConverter(org.springframework.ai.converter.StructuredOutputConverter<Object> structuredOutputConverter) A StructuredOutputConverter for converting the chat response to structured output (e.g., BeanOutputConverter, MapOutputConverter, ListOutputConverter). When provided, the converter will be used to transform the response into the desired format. The option is a:org.springframework.ai.converter.StructuredOutputConverter<java.lang.Object>type. Group: advanced- Parameters:
structuredOutputConverter- the value to set- Returns:
- the dsl builder
-
structuredOutputConverter
default SpringAiChatEndpointBuilderFactory.AdvancedSpringAiChatEndpointBuilder structuredOutputConverter(String structuredOutputConverter) A StructuredOutputConverter for converting the chat response to structured output (e.g., BeanOutputConverter, MapOutputConverter, ListOutputConverter). When provided, the converter will be used to transform the response into the desired format. The option will be converted to aorg.springframework.ai.converter.StructuredOutputConverter<java.lang.Object>type. Group: advanced- Parameters:
structuredOutputConverter- the value to set- Returns:
- the dsl builder
-
systemMetadata
default SpringAiChatEndpointBuilderFactory.AdvancedSpringAiChatEndpointBuilder systemMetadata(Map<String, Object> systemMetadata) Metadata to attach to system messages. This metadata can be used for tracking system prompt versions, model configurations, or other application-specific data. The option is a:java.util.Map<java.lang.String, java.lang.Object>type. Group: advanced- Parameters:
systemMetadata- the value to set- Returns:
- the dsl builder
-
systemMetadata
default SpringAiChatEndpointBuilderFactory.AdvancedSpringAiChatEndpointBuilder systemMetadata(String systemMetadata) Metadata to attach to system messages. This metadata can be used for tracking system prompt versions, model configurations, or other application-specific data. The option will be converted to ajava.util.Map<java.lang.String, java.lang.Object>type. Group: advanced- Parameters:
systemMetadata- the value to set- Returns:
- the dsl builder
-
temperature
default SpringAiChatEndpointBuilderFactory.AdvancedSpringAiChatEndpointBuilder temperature(Double temperature) Temperature parameter for response randomness (0.0-2.0). The option is a:java.lang.Doubletype. Group: advanced- Parameters:
temperature- the value to set- Returns:
- the dsl builder
-
temperature
default SpringAiChatEndpointBuilderFactory.AdvancedSpringAiChatEndpointBuilder temperature(String temperature) Temperature parameter for response randomness (0.0-2.0). The option will be converted to ajava.lang.Doubletype. Group: advanced- Parameters:
temperature- the value to set- Returns:
- the dsl builder
-
topKSampling
default SpringAiChatEndpointBuilderFactory.AdvancedSpringAiChatEndpointBuilder topKSampling(Integer topKSampling) Top K parameter for sampling. The option is a:java.lang.Integertype. Group: advanced- Parameters:
topKSampling- the value to set- Returns:
- the dsl builder
-
topKSampling
default SpringAiChatEndpointBuilderFactory.AdvancedSpringAiChatEndpointBuilder topKSampling(String topKSampling) Top K parameter for sampling. The option will be converted to ajava.lang.Integertype. Group: advanced- Parameters:
topKSampling- the value to set- Returns:
- the dsl builder
-
topP
Top P parameter for nucleus sampling. The option is a:java.lang.Doubletype. Group: advanced- Parameters:
topP- the value to set- Returns:
- the dsl builder
-
topP
Top P parameter for nucleus sampling. The option will be converted to ajava.lang.Doubletype. Group: advanced- Parameters:
topP- the value to set- Returns:
- the dsl builder
-
userMetadata
default SpringAiChatEndpointBuilderFactory.AdvancedSpringAiChatEndpointBuilder userMetadata(Map<String, Object> userMetadata) Metadata to attach to user messages. This metadata can be used for tracking conversation context, message identifiers, or other application-specific data. The option is a:java.util.Map<java.lang.String, java.lang.Object>type. Group: advanced- Parameters:
userMetadata- the value to set- Returns:
- the dsl builder
-
userMetadata
default SpringAiChatEndpointBuilderFactory.AdvancedSpringAiChatEndpointBuilder userMetadata(String userMetadata) Metadata to attach to user messages. This metadata can be used for tracking conversation context, message identifiers, or other application-specific data. The option will be converted to ajava.util.Map<java.lang.String, java.lang.Object>type. Group: advanced- Parameters:
userMetadata- the value to set- Returns:
- the dsl builder
-
safeguardOrder
default SpringAiChatEndpointBuilderFactory.AdvancedSpringAiChatEndpointBuilder safeguardOrder(Integer safeguardOrder) Order of execution for SafeGuard advisor. Lower numbers execute first. Default is 0. The option is a:java.lang.Integertype. Group: security (advanced)- Parameters:
safeguardOrder- the value to set- Returns:
- the dsl builder
-
safeguardOrder
default SpringAiChatEndpointBuilderFactory.AdvancedSpringAiChatEndpointBuilder safeguardOrder(String safeguardOrder) Order of execution for SafeGuard advisor. Lower numbers execute first. Default is 0. The option will be converted to ajava.lang.Integertype. Group: security (advanced)- Parameters:
safeguardOrder- the value to set- Returns:
- the dsl builder
-