Record Class OpenAiApi.ChatCompletionRequest.WebSearchOptions
java.lang.Object
java.lang.Record
org.springframework.ai.openai.api.OpenAiApi.ChatCompletionRequest.WebSearchOptions
- Record Components:
searchContextSize-userLocation-
- Enclosing class:
- OpenAiApi.ChatCompletionRequest
public static record OpenAiApi.ChatCompletionRequest.WebSearchOptions(OpenAiApi.ChatCompletionRequest.WebSearchOptions.SearchContextSize searchContextSize, OpenAiApi.ChatCompletionRequest.WebSearchOptions.UserLocation userLocation)
extends Record
This tool searches the web for relevant results to use in a response.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumHigh level guidance for the amount of context window space to use for the search.static final recordApproximate location parameters for the search. -
Constructor Summary
ConstructorsConstructorDescriptionWebSearchOptions(OpenAiApi.ChatCompletionRequest.WebSearchOptions.SearchContextSize searchContextSize, OpenAiApi.ChatCompletionRequest.WebSearchOptions.UserLocation userLocation) Creates an instance of aWebSearchOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thesearchContextSizerecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theuserLocationrecord component.
-
Constructor Details
-
WebSearchOptions
public WebSearchOptions(OpenAiApi.ChatCompletionRequest.WebSearchOptions.SearchContextSize searchContextSize, OpenAiApi.ChatCompletionRequest.WebSearchOptions.UserLocation userLocation) Creates an instance of aWebSearchOptionsrecord class.- Parameters:
searchContextSize- the value for thesearchContextSizerecord componentuserLocation- the value for theuserLocationrecord 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). -
searchContextSize
Returns the value of thesearchContextSizerecord component.- Returns:
- the value of the
searchContextSizerecord component
-
userLocation
Returns the value of theuserLocationrecord component.- Returns:
- the value of the
userLocationrecord component
-