Record Class HostedTool.WebSearch
java.lang.Object
java.lang.Record
org.springframework.ai.openai.responses.HostedTool.WebSearch
- Record Components:
searchContextSize- one oflow,medium,high, ornullfor the provider defaultallowedDomains- restricts results to these domains, ornullfor no restriction
- All Implemented Interfaces:
HostedTool
- Enclosing interface:
- HostedTool
public static record HostedTool.WebSearch(@Nullable String searchContextSize, @Nullable List<String> allowedDomains)
extends Record
implements HostedTool
Search the public web. See the
web search
guide.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.ai.openai.responses.HostedTool
HostedTool.CodeInterpreter, HostedTool.FileSearch, HostedTool.ImageGeneration, HostedTool.Mcp, HostedTool.Raw, HostedTool.WebSearch -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theallowedDomainsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static HostedTool.WebSearchof()@Nullable StringReturns the value of thesearchContextSizerecord component.final StringtoString()Returns a string representation of this record class.com.openai.models.responses.TooltoTool()Convert this tool to the SDK request representation.
-
Constructor Details
-
WebSearch
Creates an instance of aWebSearchrecord class.- Parameters:
searchContextSize- the value for thesearchContextSizerecord componentallowedDomains- the value for theallowedDomainsrecord component
-
-
Method Details
-
of
-
toTool
public com.openai.models.responses.Tool toTool()Description copied from interface:HostedToolConvert this tool to the SDK request representation.- Specified by:
toToolin interfaceHostedTool
-
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
-
allowedDomains
Returns the value of theallowedDomainsrecord component.- Returns:
- the value of the
allowedDomainsrecord component
-