CachingClientGetCachedContentAsync Method

Retrieves a specific cached content resource asynchronously.

Definition

Namespace: GenerativeAI.Clients
Assembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
C#
public Task<CachedContent?> GetCachedContentAsync(
	string name,
	CancellationToken cancellationToken = default
)

Parameters

name  String
The resource name of the cached content to retrieve.
cancellationToken  CancellationToken  (Optional)
Optional cancellation token to cancel the operation.

Return Value

TaskCachedContent
An instance of CachedContent representing the retrieved resource, or null if not found.

See Also