Interface OpenAIEndpointBuilderFactory.OpenAIEndpointBuilder

All Superinterfaces:
org.apache.camel.builder.EndpointProducerBuilder, org.apache.camel.EndpointProducerResolver
Enclosing interface:
OpenAIEndpointBuilderFactory

public static interface OpenAIEndpointBuilderFactory.OpenAIEndpointBuilder extends org.apache.camel.builder.EndpointProducerBuilder
Builder for endpoint for the OpenAI component.
  • Method Details

    • advanced

    • additionalBodyProperty

      default OpenAIEndpointBuilderFactory.OpenAIEndpointBuilder additionalBodyProperty(String key, Object value)
      Additional JSON properties to include in the request body (e.g. additionalBodyProperty.traceId=123). This is a multi-value option with prefix: additionalBodyProperty. The option is a: java.util.Map<java.lang.String, java.lang.Object> type. The option is multivalued, and you can use the additionalBodyProperty(String, Object) method to add a value (call the method multiple times to set more values). Group: producer
      Parameters:
      key - the option key
      value - the option value
      Returns:
      the dsl builder
    • additionalBodyProperty

      default OpenAIEndpointBuilderFactory.OpenAIEndpointBuilder additionalBodyProperty(Map values)
      Additional JSON properties to include in the request body (e.g. additionalBodyProperty.traceId=123). This is a multi-value option with prefix: additionalBodyProperty. The option is a: java.util.Map<java.lang.String, java.lang.Object> type. The option is multivalued, and you can use the additionalBodyProperty(String, Object) method to add a value (call the method multiple times to set more values). Group: producer
      Parameters:
      values - the values
      Returns:
      the dsl builder
    • apiKey

      OpenAI API key. Can also be set via OPENAI_API_KEY environment variable. The option is a: java.lang.String type. Group: producer
      Parameters:
      apiKey - the value to set
      Returns:
      the dsl builder
    • baseUrl

      Base URL for OpenAI API. Defaults to OpenAI's official endpoint. Can be used for local or third-party providers. The option is a: java.lang.String type. Default: https://api.openai.com/v1 Group: producer
      Parameters:
      baseUrl - the value to set
      Returns:
      the dsl builder
    • conversationHistoryProperty

      default OpenAIEndpointBuilderFactory.OpenAIEndpointBuilder conversationHistoryProperty(String conversationHistoryProperty)
      Exchange property name for storing conversation history. The option is a: java.lang.String type. Default: CamelOpenAIConversationHistory Group: producer
      Parameters:
      conversationHistoryProperty - the value to set
      Returns:
      the dsl builder
    • conversationMemory

      default OpenAIEndpointBuilderFactory.OpenAIEndpointBuilder conversationMemory(boolean conversationMemory)
      Enable conversation memory per Exchange. The option is a: boolean type. Default: false Group: producer
      Parameters:
      conversationMemory - the value to set
      Returns:
      the dsl builder
    • conversationMemory

      default OpenAIEndpointBuilderFactory.OpenAIEndpointBuilder conversationMemory(String conversationMemory)
      Enable conversation memory per Exchange. The option will be converted to a boolean type. Default: false Group: producer
      Parameters:
      conversationMemory - the value to set
      Returns:
      the dsl builder
    • developerMessage

      default OpenAIEndpointBuilderFactory.OpenAIEndpointBuilder developerMessage(String developerMessage)
      Developer message to prepend before user messages. The option is a: java.lang.String type. Group: producer
      Parameters:
      developerMessage - the value to set
      Returns:
      the dsl builder
    • dimensions

      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. The option is a: java.lang.Integer type. Group: producer
      Parameters:
      dimensions - the value to set
      Returns:
      the dsl builder
    • dimensions

      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. The option will be converted to a java.lang.Integer type. Group: producer
      Parameters:
      dimensions - the value to set
      Returns:
      the dsl builder
    • embeddingModel

      default OpenAIEndpointBuilderFactory.OpenAIEndpointBuilder embeddingModel(String embeddingModel)
      The model to use for embeddings. The option is a: java.lang.String type. Group: producer
      Parameters:
      embeddingModel - the value to set
      Returns:
      the dsl builder
    • encodingFormat

      default OpenAIEndpointBuilderFactory.OpenAIEndpointBuilder encodingFormat(String encodingFormat)
      The format for embedding output: 'float' for list of floats, 'base64' for compressed format. The option is a: java.lang.String type. Default: base64 Group: producer
      Parameters:
      encodingFormat - the value to set
      Returns:
      the dsl builder
    • jsonSchema

      JSON schema for structured output validation. This option can also be loaded from an existing file, by prefixing with file: or classpath: followed by the location of the file. The option is a: java.lang.String type. Group: producer
      Parameters:
      jsonSchema - the value to set
      Returns:
      the dsl builder
    • maxTokens

      Maximum number of tokens to generate. The option is a: java.lang.Integer type. Group: producer
      Parameters:
      maxTokens - the value to set
      Returns:
      the dsl builder
    • maxTokens

      Maximum number of tokens to generate. The option will be converted to a java.lang.Integer type. Group: producer
      Parameters:
      maxTokens - the value to set
      Returns:
      the dsl builder
    • model

      The model to use for chat completion. The option is a: java.lang.String type. Group: producer
      Parameters:
      model - the value to set
      Returns:
      the dsl builder
    • outputClass

      Fully qualified class name for structured output using response format. The option is a: java.lang.String type. Group: producer
      Parameters:
      outputClass - the value to set
      Returns:
      the dsl builder
    • storeFullResponse

      default OpenAIEndpointBuilderFactory.OpenAIEndpointBuilder storeFullResponse(boolean storeFullResponse)
      Store the full response in the exchange property 'CamelOpenAIResponse' in non-streaming mode. The option is a: boolean type. Default: false Group: producer
      Parameters:
      storeFullResponse - the value to set
      Returns:
      the dsl builder
    • storeFullResponse

      default OpenAIEndpointBuilderFactory.OpenAIEndpointBuilder storeFullResponse(String storeFullResponse)
      Store the full response in the exchange property 'CamelOpenAIResponse' in non-streaming mode. The option will be converted to a boolean type. Default: false Group: producer
      Parameters:
      storeFullResponse - the value to set
      Returns:
      the dsl builder
    • streaming

      default OpenAIEndpointBuilderFactory.OpenAIEndpointBuilder streaming(boolean streaming)
      Enable streaming responses. The option is a: boolean type. Default: false Group: producer
      Parameters:
      streaming - the value to set
      Returns:
      the dsl builder
    • streaming

      Enable streaming responses. The option will be converted to a boolean type. Default: false Group: producer
      Parameters:
      streaming - the value to set
      Returns:
      the dsl builder
    • systemMessage

      default OpenAIEndpointBuilderFactory.OpenAIEndpointBuilder systemMessage(String systemMessage)
      System message to prepend. When set and conversationMemory is enabled, the conversation history is reset. The option is a: java.lang.String type. Group: producer
      Parameters:
      systemMessage - the value to set
      Returns:
      the dsl builder
    • temperature

      Temperature for response generation (0.0 to 2.0). The option is a: java.lang.Double type. Group: producer
      Parameters:
      temperature - the value to set
      Returns:
      the dsl builder
    • temperature

      Temperature for response generation (0.0 to 2.0). The option will be converted to a java.lang.Double type. Group: producer
      Parameters:
      temperature - the value to set
      Returns:
      the dsl builder
    • topP

      Top P for response generation (0.0 to 1.0). The option is a: java.lang.Double type. Group: producer
      Parameters:
      topP - the value to set
      Returns:
      the dsl builder
    • topP

      Top P for response generation (0.0 to 1.0). The option will be converted to a java.lang.Double type. Group: producer
      Parameters:
      topP - the value to set
      Returns:
      the dsl builder
    • userMessage

      Default user message text to use when no prompt is provided. The option is a: java.lang.String type. Group: producer
      Parameters:
      userMessage - the value to set
      Returns:
      the dsl builder