Class GoogleSearch
GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.
public record GoogleSearch : IEquatable<GoogleSearch>
- Inheritance
-
GoogleSearch
- Implements
- Inherited Members
Properties
BlockingConfidence
Optional. Sites with confidence level chosen & above this value will be blocked from the search results. This field is not supported in Gemini API.
[JsonPropertyName("blockingConfidence")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public PhishBlockThreshold? BlockingConfidence { get; set; }
Property Value
ExcludeDomains
Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. Example: ["amazon.com", "facebook.com"]. This field is not supported in Gemini API.
[JsonPropertyName("excludeDomains")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<string>? ExcludeDomains { get; set; }
Property Value
SearchTypes
Optional. The set of search types to enable. If not set, web search is enabled by default.
[JsonPropertyName("searchTypes")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public SearchTypes? SearchTypes { get; set; }
Property Value
TimeRangeFilter
Optional. Filter search results to a specific time range. If customers set a start time, they must set an end time (and vice versa). This field is not supported in Vertex AI.
[JsonPropertyName("timeRangeFilter")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public Interval? TimeRangeFilter { get; set; }
Property Value
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a GoogleSearch object.
public static GoogleSearch? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- GoogleSearch
The deserialized GoogleSearch object, or null if deserialization fails.