Class OpenAiModelOptions

java.lang.Object
com.langchainbeam.model.LangchainModelOptions
com.langchainbeam.model.openai.OpenAiModelOptions
All Implemented Interfaces:
Serializable

public class OpenAiModelOptions extends LangchainModelOptions
Configuration options for building an OpenAI model within LangChain-Beam

This class extends LangchainModelOptions and provides specific configuration options required for interacting with OpenAI models, such as model name, API key, temperature, max tokens to create and configure an OpenAiChatModel.

See Also:
  • Constructor Details

    • OpenAiModelOptions

      public OpenAiModelOptions(String apiKey, String modelName, Double temperature, Double topP, List<String> stop, Integer maxCompletionTokens)
      Constructs an instance of OpenAiModelOptions with the specified configuration settings.
      Parameters:
      apiKey - The API key for authenticating requests to the OpenAI API.
      modelName - The name of the model to use.
      temperature - The temperature value for controlling randomness in output.
      topP - The top-p value for nucleus sampling.
      stop - A list of stop sequences to terminate the generation.
      maxCompletionTokens - The maximum number of tokens to generate in the completion.
  • Method Details

    • getModelName

      public String getModelName()
    • getApiKey

      public String getApiKey()
    • getTemperature

      public Double getTemperature()
    • getTopP

      public Double getTopP()
    • getStop

      public List<String> getStop()
    • getMaxCompletionTokens

      public Integer getMaxCompletionTokens()