IGenerativeAIGetModelAsync Method

Retrieves a specific AI model by its name asynchronously from the Google's AI platform.

Definition

Namespace: GenerativeAI
Assembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
C#
Task<Model> GetModelAsync(
	string modelName,
	CancellationToken cancellationToken = default
)

Parameters

modelName  String
The unique name of the model to retrieve.
cancellationToken  CancellationToken  (Optional)
A token to monitor for cancellation requests.

Return Value

TaskModel
A task representing the asynchronous operation, containing the requested model details as a Model object.

See Also