public class GenerateContentRequestForCountToken : GenerateContentRequest
GenerateContentRequestForCountToken | Initializes a new instance of GenerateContentRequestForCountToken with the provided model and base request. |
CachedContent |
Optional. The name of the content
cached to use as context
to serve the prediction. Format: cachedContents/{cachedContent} (Inherited from GenerateContentRequest) |
Contents |
Required. The content of the current conversation with the model.
For single-turn queries, this is a single instance. For multi-turn queries like
chat,
this is a repeated field that contains the conversation history and the latest request.
(Inherited from GenerateContentRequest) |
GenerationConfig |
Optional. Configuration options for model generation and outputs.
(Inherited from GenerateContentRequest) |
Model | Required. The name of the Model to use for generating the completion. Format: models/{model}. |
SafetySettings |
Optional. A list of unique SafetySetting instances for blocking unsafe content.
This will be enforced on the GenerateContentRequest.Contents and
GenerateContentResponse.Candidates. There should not be more than one setting for each
SafetyCategory type. The API will block any contents and responses that fail to meet
the thresholds set by these settings. This list overrides the default settings for each
SafetyCategory specified in the SafetySettings. If there is no SafetySetting
for a given SafetyCategory provided in the list, the API will use the default safety
setting for that category. Harm categories HARM_CATEGORY_HATE_SPEECH,
HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_DANGEROUS_CONTENT, HARM_CATEGORY_HARASSMENT,
HARM_CATEGORY_CIVIC_INTEGRITY are supported. Refer to the
guide for detailed
information on available safety settings. Also refer to the
Safety guidance to
learn how to incorporate safety considerations in your AI applications.
(Inherited from GenerateContentRequest) |
SystemInstruction |
Optional. Developer set
system instruction(s).
Currently, text only.
(Inherited from GenerateContentRequest) |
ToolConfig |
Optional. Tool configuration for any Tool specified in the request.
Refer to the Function calling guide
for a usage example.
(Inherited from GenerateContentRequest) |
Tools |
Optional. A list of Tools the Model may use to generate the next response.
A Tool is a piece of code that enables the system to interact with external systems
to perform an action, or set of actions, outside of knowledge and scope of the Model.
Supported Tools are Function and codeExecution. Refer to the
Function calling and the
Code execution guides to learn more.
(Inherited from GenerateContentRequest) |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) |
GetHashCode | Serves as the default hash function. (Inherited from Object) |
GetType | Gets the Type of the current instance. (Inherited from Object) |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) |
ToString | Returns a string that represents the current object. (Inherited from Object) |
AddRemoteFile |
Adds a remote file to the IContentsRequest using a RemoteFile object.
(Defined by IContentRequest_Extensions) |
AddTool |
Adds a Tool to the GenerateContentRequest with an optional ToolConfig.
(Defined by GenerateContentRequestExtensions) |
UseJsonModeT |
Configures the GenerateContentRequest to use JSON mode for responses of the specified type T.
(Defined by GenerateContentRequestExtensions) |