Record Class OpenAiApi.ChatCompletionMessage.Annotation.UrlCitation
java.lang.Object
java.lang.Record
org.springframework.ai.openai.api.OpenAiApi.ChatCompletionMessage.Annotation.UrlCitation
- Record Components:
endIndex- The index of the last character of the URL citation in the message.startIndex- The index of the first character of the URL citation in the message.title- The title of the web resource.url- The URL of the web resource.
- Enclosing class:
- OpenAiApi.ChatCompletionMessage.Annotation
public static record OpenAiApi.ChatCompletionMessage.Annotation.UrlCitation(Integer endIndex, Integer startIndex, String title, String url)
extends Record
A URL citation when using web search.
-
Constructor Summary
ConstructorsConstructorDescriptionUrlCitation(Integer endIndex, Integer startIndex, String title, String url) Creates an instance of aUrlCitationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionendIndex()Returns the value of theendIndexrecord component.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 thestartIndexrecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.url()Returns the value of theurlrecord component.
-
Constructor Details
-
UrlCitation
Creates an instance of aUrlCitationrecord class.- Parameters:
endIndex- the value for theendIndexrecord componentstartIndex- the value for thestartIndexrecord componenttitle- the value for thetitlerecord componenturl- the value for theurlrecord component
-
-
Method Details
-
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). -
endIndex
Returns the value of theendIndexrecord component.- Returns:
- the value of the
endIndexrecord component
-
startIndex
Returns the value of thestartIndexrecord component.- Returns:
- the value of the
startIndexrecord component
-
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-