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
Checkpoints
Optional. The checkpoints of the model.
[JsonPropertyName("checkpoints")]
public List<Checkpoint>? Checkpoints { get; set; }
Property Value
DefaultCheckpointId
Optional. The default checkpoint id of a model version.
[JsonPropertyName("defaultCheckpointId")]
public string? DefaultCheckpointId { get; set; }
Property Value
Description
A short description of the model.
[JsonPropertyName("description")]
public string? Description { get; set; }
Property Value
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
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
InputTokenLimit
Maximum number of input tokens allowed for this model.
[JsonPropertyName("inputTokenLimit")]
public int InputTokenLimit { get; set; }
Property Value
Labels
Optional. Labels with user-defined metadata to organize your models.
[JsonPropertyName("labels")]
public Dictionary<string, string>? Labels { get; set; }
Property Value
MaxTemperature
The maximum temperature this model can use.
[JsonPropertyName("maxTemperature")]
public double MaxTemperature { get; set; }
Property Value
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
OutputTokenLimit
Maximum number of output tokens available for this model.
[JsonPropertyName("outputTokenLimit")]
public int OutputTokenLimit { get; set; }
Property Value
SupportedActions
Optional. List of actions that are supported by the model.
[JsonPropertyName("supportedActions")]
public List<string>? SupportedActions { get; set; }
Property Value
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
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
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
TunedModelInfo
Optional. Information about the tuned model from the base model.
[JsonPropertyName("tunedModelInfo")]
public TunedModelInfo? TunedModelInfo { get; set; }
Property Value
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; }