Interface ChatModelConfig


public interface ChatModelConfig
  • Method Details

    • modelName

      @WithDefault("claude-3-haiku-20240307") String modelName()
      Model name to use
    • temperature

      @ConfigDocDefault("0.7") OptionalDouble temperature()
      What sampling temperature to use, between 0.0 and 1.0. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.

      It is generally recommended to set this or the top-k property but not both.

    • maxTokens

      @WithDefault("1024") Integer maxTokens()
      The maximum number of tokens to generate in the completion.

      The token count of your prompt plus max_tokens cannot exceed the model's context length

    • topP

      @ConfigDocDefault("1.0") OptionalDouble topP()
      Double (0.0-1.0). Nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.

      It is generally recommended to set this or the temperature property but not both.

    • topK

      @WithDefault("40") Integer topK()
      Reduces the probability of generating nonsense. A higher value (e.g. 100) will give more diverse answers, while a lower value (e.g. 10) will be more conservative
    • maxRetries

      @WithDefault("3") Integer maxRetries()
      The maximum number of retries for API requests.
    • stopSequences

      Optional<List<String>> stopSequences()
      The custom text sequences that will cause the model to stop generating
    • logRequests

      @ConfigDocDefault("false") Optional<Boolean> logRequests()
      Whether chat model requests should be logged
    • logResponses

      @ConfigDocDefault("false") Optional<Boolean> logResponses()
      Whether chat model responses should be logged