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 enum
High level guidance for the amount of context window space to use for the search.static final record
Approximate location parameters for the search. -
Constructor Summary
ConstructorsConstructorDescriptionWebSearchOptions
(OpenAiApi.ChatCompletionRequest.WebSearchOptions.SearchContextSize searchContextSize, OpenAiApi.ChatCompletionRequest.WebSearchOptions.UserLocation userLocation) Creates an instance of aWebSearchOptions
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal 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 thesearchContextSize
record component.final String
toString()
Returns a string representation of this record class.Returns the value of theuserLocation
record component.
-
Constructor Details
-
WebSearchOptions
public WebSearchOptions(OpenAiApi.ChatCompletionRequest.WebSearchOptions.SearchContextSize searchContextSize, OpenAiApi.ChatCompletionRequest.WebSearchOptions.UserLocation userLocation) Creates an instance of aWebSearchOptions
record class.- Parameters:
searchContextSize
- the value for thesearchContextSize
record componentuserLocation
- the value for theuserLocation
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)
. -
searchContextSize
Returns the value of thesearchContextSize
record component.- Returns:
- the value of the
searchContextSize
record component
-
userLocation
Returns the value of theuserLocation
record component.- Returns:
- the value of the
userLocation
record component
-