Table of Contents

Class Model

Namespace
GenerativeAI.Types
Assembly
GenerativeAI.dll

Information about a Generative Language Model.

public class Model
Inheritance
Model
Inherited Members
Extension Methods

Properties

BaseModelId

Required. The name of the base model, pass this to the generation request. Examples:

  • gemini-1.5-flash
[JsonPropertyName("baseModelId")]
public string BaseModelId { get; set; }

Property Value

string

Checkpoints

Optional. The checkpoints of the model.

[JsonPropertyName("checkpoints")]
public List<Checkpoint>? Checkpoints { get; set; }

Property Value

List<Checkpoint>

DefaultCheckpointId

Optional. The default checkpoint id of a model version.

[JsonPropertyName("defaultCheckpointId")]
public string? DefaultCheckpointId { get; set; }

Property Value

string

Description

A short description of the model.

[JsonPropertyName("description")]
public string? Description { get; set; }

Property Value

string

DisplayName

The human-readable name of the model. E.g. "Gemini 1.5 Flash". The name can be up to 128 characters long and can consist of any UTF-8 characters.

[JsonPropertyName("displayName")]
public string? DisplayName { get; set; }

Property Value

string

Endpoints

Optional. List of deployed models created from this base model. Note that a model could have been deployed to endpoints in different locations.

[JsonPropertyName("endpoints")]
public List<Endpoint>? Endpoints { get; set; }

Property Value

List<Endpoint>

InputTokenLimit

Maximum number of input tokens allowed for this model.

[JsonPropertyName("inputTokenLimit")]
public int InputTokenLimit { get; set; }

Property Value

int

Labels

Optional. Labels with user-defined metadata to organize your models.

[JsonPropertyName("labels")]
public Dictionary<string, string>? Labels { get; set; }

Property Value

Dictionary<string, string>

MaxTemperature

The maximum temperature this model can use.

[JsonPropertyName("maxTemperature")]
public double MaxTemperature { get; set; }

Property Value

double

Name

Required. The resource name of the Model. Refer to Model variants for all allowed values. Format: models/{model} with a {model} naming convention of:

  • "{baseModelId}-{version}" Examples:
  • models/gemini-1.5-flash-001
[JsonPropertyName("name")]
public string Name { get; set; }

Property Value

string

OutputTokenLimit

Maximum number of output tokens available for this model.

[JsonPropertyName("outputTokenLimit")]
public int OutputTokenLimit { get; set; }

Property Value

int

SupportedActions

Optional. List of actions that are supported by the model.

[JsonPropertyName("supportedActions")]
public List<string>? SupportedActions { get; set; }

Property Value

List<string>

SupportedGenerationMethods

The model's supported generation methods. The corresponding API method names are defined as Pascal case strings, such as generateMessage and generateContent.

[JsonPropertyName("supportedGenerationMethods")]
public List<string>? SupportedGenerationMethods { get; set; }

Property Value

List<string>

Temperature

Controls the randomness of the output. Values can range over [0.0,maxTemperature], inclusive. A higher value will produce responses that are more varied, while a value closer to 0.0 will typically result in less surprising responses from the model. This value specifies default to be used by the backend while making the call to the model.

[JsonPropertyName("temperature")]
public double Temperature { get; set; }

Property Value

double

Thinking

Whether the model supports thinking.

[JsonPropertyName("thinking")]
public bool? Thinking { get; set; }

Property Value

bool?

TopK

For Top-k sampling. Top-k sampling considers the set of topK most probable tokens. This value specifies default to be used by the backend while making the call to the model. If empty, indicates the model doesn't use top-k sampling, and topK isn't allowed as a generation parameter.

[JsonPropertyName("topK")]
public int? TopK { get; set; }

Property Value

int?

TopP

For Nucleus sampling. Nucleus sampling considers the smallest set of tokens whose probability sum is at least topP. This value specifies default to be used by the backend while making the call to the model.

[JsonPropertyName("topP")]
public double TopP { get; set; }

Property Value

double

TunedModelInfo

Optional. Information about the tuned model from the base model.

[JsonPropertyName("tunedModelInfo")]
public TunedModelInfo? TunedModelInfo { get; set; }

Property Value

TunedModelInfo

Version

Required. The version number of the model. This represents the major version (1.0 or 1.5)

[JsonPropertyName("version")]
public string Version { get; set; }

Property Value

string

See Also