Model Class

Information about a Generative Language Model.

Definition

Namespace: GenerativeAI.Types
Assembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
C#
public class Model
Inheritance
Object    Model

Constructors

ModelInitializes a new instance of the Model class

Properties

BaseModelId Required. The name of the base model, pass this to the generation request. Examples: - gemini-1.5-flash
Description A short description of the model.
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.
InputTokenLimit Maximum number of input tokens allowed for this model.
MaxTemperature The maximum temperature this model can use.
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
OutputTokenLimit Maximum number of output tokens available for this model.
SupportedGenerationMethods The model's supported generation methods. The corresponding API method names are defined as Pascal case strings, such as generateMessage and generateContent.
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.
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.
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.
Version Required. The version number of the model. This represents the major version (1.0 or 1.5)

Methods

EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ToStringReturns a string that represents the current object.
(Inherited from Object)

See Also