Class CreateCachedContentConfig
Optional configuration for cached content creation.
public record CreateCachedContentConfig : IEquatable<CreateCachedContentConfig>
- Inheritance
-
CreateCachedContentConfig
- Implements
- Inherited Members
Properties
Contents
The content to cache.
[JsonPropertyName("contents")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<Content>? Contents { get; set; }
Property Value
DisplayName
The user-generated meaningful display name of the cached content.
[JsonPropertyName("displayName")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? DisplayName { get; set; }
Property Value
ExpireTime
Timestamp of when this resource is considered expired. Uses RFC 3339 format, Example: 2014-10-02T15:01:23Z.
[JsonPropertyName("expireTime")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public DateTime? ExpireTime { get; set; }
Property Value
HttpOptions
Used to override HTTP request options.
[JsonPropertyName("httpOptions")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public HttpOptions? HttpOptions { get; set; }
Property Value
KmsKeyName
The Cloud KMS resource identifier of the customer managed encryption key used to protect a resource. The key needs to be in the same region as where the compute resource is created. See https://cloud.google.com/vertex-ai/docs/general/cmek for more details. If this is set, then all created CachedContent objects will be encrypted with the provided encryption key. Allowed formats: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}
[JsonPropertyName("kmsKeyName")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? KmsKeyName { get; set; }
Property Value
SystemInstruction
Developer set system instruction.
[JsonPropertyName("systemInstruction")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public Content? SystemInstruction { get; set; }
Property Value
ToolConfig
Configuration for the tools to use. This config is shared for all tools.
[JsonPropertyName("toolConfig")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ToolConfig? ToolConfig { get; set; }
Property Value
Tools
A list of Tools the model may use to generate the next response.
[JsonPropertyName("tools")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<Tool>? Tools { get; set; }
Property Value
Ttl
The TTL for this resource. The expiration time is computed: now + TTL. It is a duration string, with up to nine fractional digits, terminated by 's'. Example: "3.5s".
[JsonPropertyName("ttl")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Ttl { get; set; }
Property Value
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a CreateCachedContentConfig object.
public static CreateCachedContentConfig? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- CreateCachedContentConfig
The deserialized CreateCachedContentConfig object, or null if deserialization fails.