Class OpenAIModelInput
java.lang.Object
org.apache.beam.sdk.ml.inference.openai.OpenAIModelInput
- All Implemented Interfaces:
Serializable,BaseInput
Input for OpenAI model inference requests.
This class encapsulates text input to be sent to OpenAI models.
Example Usage
OpenAIModelInput input = OpenAIModelInput.create("Translate to French: Hello");
String text = input.getModelInput(); // "Translate to French: Hello"
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic OpenAIModelInputCreates a new input instance with the specified text.Returns the text input for the model.
-
Method Details
-
getModelInput
Returns the text input for the model.- Returns:
- the input text string
-
create
Creates a new input instance with the specified text.- Parameters:
input- the text to send to the model- Returns:
- a new
OpenAIModelInputinstance
-