Table of Contents

Class WebSearchPreviewTool

Namespace
OpenAI.Responses
Assembly
OpenAI-DotNet.dll

This tool searches the web for relevant results to use in a response.

public sealed class WebSearchPreviewTool : ITool
Inheritance
WebSearchPreviewTool
Implements
Inherited Members

Constructors

WebSearchPreviewTool()

public WebSearchPreviewTool()

WebSearchPreviewTool(SearchContextSize, UserLocation)

public WebSearchPreviewTool(SearchContextSize searchContextSize = (SearchContextSize)0, UserLocation userLocation = null)

Parameters

searchContextSize SearchContextSize
userLocation UserLocation

Properties

SearchContextSize

High level guidance for the amount of context window space to use for the search. One of low, medium, or high. medium is the default.

[JsonInclude]
[JsonPropertyName("search_context_size")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public SearchContextSize SearchContextSize { get; }

Property Value

SearchContextSize

Type

[JsonInclude]
[JsonPropertyName("type")]
public string Type { get; }

Property Value

string

UserLocation

The user's location.

[JsonInclude]
[JsonPropertyName("user_location")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public UserLocation UserLocation { get; }

Property Value

UserLocation

Operators

implicit operator Tool(WebSearchPreviewTool)

public static implicit operator Tool(WebSearchPreviewTool webSearchPreviewTool)

Parameters

webSearchPreviewTool WebSearchPreviewTool

Returns

Tool