GoogleAICredentialsValidateCredentials Method

Validates the API credentials for the GoogleAICredentials instance. Ensures that either an API Key or an Access Token is provided. Throws an exception if both are null or empty.

Definition

Namespace: GenerativeAI
Assembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
C#
public void ValidateCredentials()

Implements

ICredentialsValidateCredentials

Exceptions

Exception Thrown when neither the API Key nor the Access Token is provided.

See Also