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 Details

    • Builder

      public Builder()
      Sets default values for the Request.
  • Method Details

    • chatMotor

      public MotorVisionRequest.Builder chatMotor​(ChatMotor chatMotor)
      Sets the ChatMotor instance to be used for the request.
      Parameters:
      chatMotor - the ChatMotor instance
      Returns:
      this Builder instance for chaining
    • motorAiOptions

      public MotorVisionRequest.Builder motorAiOptions​(MotorAiOptions aiOptions)
      Sets the MotorAiOptions instance to be used for the request.
      Parameters:
      aiOptions - the MotorAiOptions instance
      Returns:
      this Builder instance for chaining
    • aiModel

      public MotorVisionRequest.Builder aiModel​(String 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

      public MotorVisionRequest.Builder contentPartText​(MotorContentPartText motorContentPartText)
      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

      public MotorVisionRequest.Builder contentPartImage​(MotorContentPartImage motorContentPartImage)
      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

      public MotorVisionRequest build()
      Builds and returns a MotorVisionRequest 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.