CachingClientGetCachedContentAsync Method
Retrieves a specific cached content resource asynchronously.
Namespace: GenerativeAI.ClientsAssembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
public Task<CachedContent?> GetCachedContentAsync(
string name,
CancellationToken cancellationToken = default
)
- name String
- The resource name of the cached content to retrieve.
- cancellationToken CancellationToken (Optional)
- Optional cancellation token to cancel the operation.
TaskCachedContentAn instance of
CachedContent representing the retrieved resource, or null if not found.