Record Class VisionRequest
java.lang.Object
java.lang.Record
bg.codexio.ai.openai.api.payload.vision.request.VisionRequest
- All Implemented Interfaces:
Streamable
public record VisionRequest(String model, List<MessageContentHolder> messages, Integer maxTokens)
extends Record
implements Streamable
Represents a
Vision request
-
Constructor Summary
ConstructorsConstructorDescriptionVisionRequest(String model, List<MessageContentHolder> messages, Integer maxTokens) Creates an instance of aVisionRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic VisionRequestempty()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themaxTokensrecord component.messages()Returns the value of themessagesrecord component.model()Returns the value of themodelrecord component.booleanstream()final StringtoString()Returns a string representation of this record class.withMessageOn(int index, MessageContentHolder messageHolder) withMessages(MessageContentHolder messageHolder) withTokens(Integer maxTokens)
-
Constructor Details
-
VisionRequest
Creates an instance of aVisionRequestrecord class.- Parameters:
model- the value for themodelrecord componentmessages- the value for themessagesrecord componentmaxTokens- the value for themaxTokensrecord component
-
-
Method Details
-
empty
-
stream
public boolean stream()- Specified by:
streamin interfaceStreamable
-
withModel
-
withMessages
-
withMessageOn
-
withTokens
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
model
Returns the value of themodelrecord component.- Returns:
- the value of the
modelrecord component
-
messages
Returns the value of themessagesrecord component.- Returns:
- the value of the
messagesrecord component
-
maxTokens
Returns the value of themaxTokensrecord component.- Returns:
- the value of the
maxTokensrecord component
-