Record Class Message
java.lang.Object
java.lang.Record
io.quarkiverse.langchain4j.ollama.Message
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theadditionalFieldsrecord component.static Message.Builderbuilder()content()Returns the value of thecontentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.images()Returns the value of theimagesrecord component.role()Returns the value of therolerecord component.Returns the value of thetoolCallsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Message
public Message(Role role, String content, List<ToolCall> toolCalls, List<String> images, Map<String, Object> additionalFields) Creates an instance of aMessagerecord class.- Parameters:
role- the value for therolerecord componentcontent- the value for thecontentrecord componenttoolCalls- the value for thetoolCallsrecord componentimages- the value for theimagesrecord componentadditionalFields- the value for theadditionalFieldsrecord component
-
-
Method Details
-
getAdditionalFields
-
builder
-
toString
-
hashCode
-
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). -
role
Returns the value of therolerecord component.- Returns:
- the value of the
rolerecord component
-
content
Returns the value of thecontentrecord component.- Returns:
- the value of the
contentrecord component
-
toolCalls
-
images
-
additionalFields
-