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 aUrlCitation
record class. -
Method Summary
Modifier and TypeMethodDescriptionendIndex()
Returns the value of theendIndex
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of thestartIndex
record component.title()
Returns the value of thetitle
record component.final String
toString()
Returns a string representation of this record class.url()
Returns the value of theurl
record component.
-
Constructor Details
-
UrlCitation
Creates an instance of aUrlCitation
record class.- Parameters:
endIndex
- the value for theendIndex
record componentstartIndex
- the value for thestartIndex
record componenttitle
- the value for thetitle
record componenturl
- the value for theurl
record 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 theendIndex
record component.- Returns:
- the value of the
endIndex
record component
-
startIndex
Returns the value of thestartIndex
record component.- Returns:
- the value of the
startIndex
record component
-
title
Returns the value of thetitle
record component.- Returns:
- the value of the
title
record component
-
url
Returns the value of theurl
record component.- Returns:
- the value of the
url
record component
-