Class OpenAIModelParameters.Builder
java.lang.Object
org.apache.beam.sdk.ml.inference.openai.OpenAIModelParameters.Builder
- Enclosing class:
OpenAIModelParameters
-
Method Summary
Modifier and TypeMethodDescriptionSets the OpenAI API key for authentication.build()Builds theOpenAIModelParametersinstance.instructionPrompt(String prompt) Sets the instruction prompt for the model.Sets the name of the OpenAI model to use.
-
Method Details
-
apiKey
Sets the OpenAI API key for authentication.- Parameters:
apiKey- the API key (required)
-
modelName
Sets the name of the OpenAI model to use.- Parameters:
modelName- the model name, e.g., "gpt-4" (required)
-
instructionPrompt
Sets the instruction prompt for the model. This prompt provides context or instructions to the model about how to process the input text.- Parameters:
prompt- the instruction text (required)
-
build
Builds theOpenAIModelParametersinstance.
-