Required. The content of the current
conversation with the model.
For single-turn queries, this is a single
instance. For multi-turn queries, this is a
repeated field that contains conversation
history + latest request.
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. The
only supported tool is currently Function.
tool_config
google.ai.generativelanguage.ToolConfig
Optional. Tool configuration for any Tool specified in
the request.
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 safety_settings. 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
are supported.
generation_config
google.ai.generativelanguage.GenerationConfig
Optional. Configuration options for model
generation and outputs.
cached_content
str
Optional. The name of the cached content used as context to
serve the prediction. Note: only used in explicit caching,
where users can have control over caching (e.g. what content
to cache) and enjoy guaranteed cost savings. Format:
cachedContents/{cachedContent}