Table of Contents

Class GeminiModelGetRequest

Gets information about a specific model. Return type is GeminiModel.

public class GeminiModelGetRequest : IGeminiGetRequest, IGeminiRequest
Inheritance
GeminiModelGetRequest
Implements
Extension Methods

Constructors

GeminiModelGetRequest(GeminiModelId, bool)

Creates a new GeminiModelGetRequest.

public GeminiModelGetRequest(GeminiModelId modelId, bool useBetaApi = false)

Parameters

modelId GeminiModelId

The ID of the model to get.

useBetaApi bool

Should the request use the Beta API?

Remarks

Some newer models do not work with this request unless through the Beta API.

Fields

ApiVersion

The API version to use.

public string ApiVersion

Field Value

string

Model

The ID of the GeminiModel to get.

public GeminiModelId Model

Field Value

GeminiModelId

Properties

AuthMethod

The preferred authentication method.

public GeminiAuthMethod AuthMethod { get; set; }

Property Value

GeminiAuthMethod

ModelName

The resource name of the model to get, in the format models/{model}.

[Obsolete("This has been deprecated, please use GeminiModelGetRequest.Model instead.")]
public string ModelName { get; set; }

Property Value

string

OAuthAccessToken

The OAuth access token to authenticate the request, if using OAuthAccessToken as AuthMethod.

public string OAuthAccessToken { get; set; }

Property Value

string

Methods

GetEndpointUri(GeminiRequestMetadata)

Gets the URI to the API endpoint.

public string GetEndpointUri(GeminiRequestMetadata metadata)

Parameters

metadata GeminiRequestMetadata

The metadata of the request to be carried out on the URI.

Returns

string

The URI.