Class Retrieval
Defines a retrieval tool that model can call to access external knowledge. This data type is not supported in Gemini API.
public record Retrieval : IEquatable<Retrieval>
- Inheritance
-
Retrieval
- Implements
- Inherited Members
Properties
DisableAttribution
Optional. Deprecated. This option is no longer supported.
[JsonPropertyName("disableAttribution")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? DisableAttribution { get; set; }
Property Value
- bool?
ExternalApi
Use data source powered by external API for grounding.
[JsonPropertyName("externalApi")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ExternalApi? ExternalApi { get; set; }
Property Value
VertexAiSearch
Set to use data source powered by Vertex AI Search.
[JsonPropertyName("vertexAiSearch")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public VertexAISearch? VertexAiSearch { get; set; }
Property Value
VertexRagStore
Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService.
[JsonPropertyName("vertexRagStore")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public VertexRagStore? VertexRagStore { get; set; }
Property Value
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a Retrieval object.
public static Retrieval? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- Retrieval
The deserialized Retrieval object, or null if deserialization fails.