Interface ChatOptions.Builder<B extends ChatOptions.Builder<B>>

All Known Subinterfaces:
ToolCallingChatOptions.Builder<B>
All Known Implementing Classes:
AnthropicChatOptions.AbstractBuilder, AnthropicChatOptions.Builder, AzureOpenAiChatOptions.AbstractBuilder, AzureOpenAiChatOptions.Builder, BedrockChatOptions.AbstractBuilder, BedrockChatOptions.Builder, DeepSeekChatOptions.AbstractBuilder, DeepSeekChatOptions.Builder, DefaultChatOptionsBuilder, DefaultToolCallingChatOptions.Builder, GoogleGenAiChatOptions.AbstractBuilder, GoogleGenAiChatOptions.Builder, MiniMaxChatOptions.AbstractBuilder, MiniMaxChatOptions.Builder, MistralAiChatOptions.AbstractBuilder, MistralAiChatOptions.Builder, OllamaChatOptions.AbstractBuilder, OllamaChatOptions.Builder, OpenAiSdkChatOptions.AbstractBuilder, OpenAiSdkChatOptions.Builder, ZhiPuAiChatOptions.AbstractBuilder, ZhiPuAiChatOptions.Builder
Enclosing interface:
ChatOptions

public static interface ChatOptions.Builder<B extends ChatOptions.Builder<B>>
Builder for creating ChatOptions instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    Build the ChatOptions.
    Mutate this builder by taking all other's values that are non-null, retaining this other values.
    frequencyPenalty(@Nullable Double frequencyPenalty)
    Builds with the frequency penalty to use for the chat.
    maxTokens(@Nullable Integer maxTokens)
    Builds with the maximum number of tokens to use for the chat.
    model(@Nullable String model)
    Builds with the model to use for the chat.
    presencePenalty(@Nullable Double presencePenalty)
    Builds with the presence penalty to use for the chat.
    stopSequences(@Nullable List<String> stopSequences)
    Builds with the stop sequences to use for the chat.
    temperature(@Nullable Double temperature)
    Builds with the temperature to use for the chat.
    topK(@Nullable Integer topK)
    Builds with the top K to use for the chat.
    topP(@Nullable Double topP)
    Builds with the top P to use for the chat.
  • Method Details

    • model

      B model(@Nullable String model)
      Builds with the model to use for the chat.
      Parameters:
      model -
      Returns:
      the builder
    • frequencyPenalty

      B frequencyPenalty(@Nullable Double frequencyPenalty)
      Builds with the frequency penalty to use for the chat.
      Parameters:
      frequencyPenalty -
      Returns:
      the builder.
    • maxTokens

      B maxTokens(@Nullable Integer maxTokens)
      Builds with the maximum number of tokens to use for the chat.
      Parameters:
      maxTokens -
      Returns:
      the builder.
    • presencePenalty

      B presencePenalty(@Nullable Double presencePenalty)
      Builds with the presence penalty to use for the chat.
      Parameters:
      presencePenalty -
      Returns:
      the builder.
    • stopSequences

      B stopSequences(@Nullable List<String> stopSequences)
      Builds with the stop sequences to use for the chat.
      Parameters:
      stopSequences -
      Returns:
      the builder.
    • temperature

      B temperature(@Nullable Double temperature)
      Builds with the temperature to use for the chat.
      Parameters:
      temperature -
      Returns:
      the builder.
    • topK

      B topK(@Nullable Integer topK)
      Builds with the top K to use for the chat.
      Parameters:
      topK -
      Returns:
      the builder.
    • topP

      B topP(@Nullable Double topP)
      Builds with the top P to use for the chat.
      Parameters:
      topP -
      Returns:
      the builder.
    • build

      ChatOptions build()
      Build the ChatOptions.
      Returns:
      the Chat options.
    • combineWith

      B combineWith(ChatOptions.Builder<?> other)
      Mutate this builder by taking all other's values that are non-null, retaining this other values.