Package com.chatmotorapi.api.vision
Class MotorVisionRequest.Builder
java.lang.Object
com.chatmotorapi.api.vision.MotorVisionRequest.Builder
- Enclosing class:
- MotorVisionRequest
public static class MotorVisionRequest.Builder extends Object
Builder class for creating a MotorVisionRequest instance.
-
Constructor Summary
Constructors Constructor Description Builder()
Sets default values for the Request. -
Method Summary
Modifier and Type Method Description MotorVisionRequest.Builder
aiModel(String aiModel)
Sets the OpenAI model to use for the requestMotorVisionRequest
build()
Builds and returns aMotorVisionRequest
instance based on the set parameters.MotorVisionRequest.Builder
chatMotor(ChatMotor chatMotor)
Sets the ChatMotor instance to be used for the request.MotorVisionRequest.Builder
contentPartImage(MotorContentPartImage motorContentPartImage)
Sets the Content Part Image for this Vision requestMotorVisionRequest.Builder
contentPartText(MotorContentPartText motorContentPartText)
Sets the Content Part Text for this Vision requestMotorVisionRequest.Builder
motorAiOptions(MotorAiOptions aiOptions)
Sets the MotorAiOptions instance to be used for the request.
-
Constructor Details
-
Builder
public Builder()Sets default values for the Request.
-
-
Method Details
-
chatMotor
Sets the ChatMotor instance to be used for the request.- Parameters:
chatMotor
- the ChatMotor instance- Returns:
- this Builder instance for chaining
-
motorAiOptions
Sets the MotorAiOptions instance to be used for the request.- Parameters:
aiOptions
- the MotorAiOptions instance- Returns:
- this Builder instance for chaining
-
aiModel
Sets the OpenAI model to use for the request- Parameters:
aiModel
- the model identifier, e.g., "gpt-4-turbo-preview"- Returns:
- this Builder instance for chaining
-
contentPartText
Sets the Content Part Text for this Vision request- Parameters:
motorContentPartText
- the Content Part Text for this Vision request- Returns:
- this Builder instance for chaining
-
contentPartImage
Sets the Content Part Image for this Vision request- Parameters:
motorContentPartImage
- the Content Part Image for this Vision request- Returns:
- this Builder instance for chaining
-
build
Builds and returns aMotorVisionRequest
instance based on the set parameters.- Returns:
- a new
MotorVisionRequest
- Throws:
IllegalArgumentException
- if the chatMotor is not provided.IllegalArgumentException
- if the motorContentPartText or motorContentPartImage are not provided.
-