Configuration for how to read Gemini requests from a multimodal dataset.
read_config
Union type
read_config
can be only one of the following:Gemini request template with placeholders.
assembledRequestColumnName
string
Optional. column name in the dataset table that contains already fully assembled Gemini requests.
JSON representation |
---|
{
// read_config
"templateConfig": {
object ( |
GeminiTemplateConfig
Template configuration to create Gemini examples from a multimodal dataset.
Required. The template that will be used for assembling the request to use for downstream applications.
fieldMapping
map (key: string, value: string)
Required. Map of template parameters to the columns in the dataset table.
JSON representation |
---|
{
"geminiExample": {
object ( |
GeminiExample
Format for Gemini examples used for Vertex Multimodal datasets.
model
string
Optional. The fully qualified name of the publisher model or tuned model endpoint to use.
Publisher model format: projects/{project}/locations/{location}/publishers/*/models/*
Tuned model endpoint format: projects/{project}/locations/{location}/endpoints/{endpoint}
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.
cachedContent
string
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: projects/{project}/locations/{location}/cachedContents/{cachedContent}
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.
Optional. Tool config. This config is shared for all tools provided in the request.
labels
map (key: string, value: string)
Optional. The labels with user-defined metadata for the request. It is used for billing and reporting only.
label keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. International characters are allowed. label values are optional. label keys must start with a letter.
Optional. Per request settings for blocking unsafe content. Enforced on GenerateContentResponse.candidates.
Optional. Generation config.
Optional. The user provided system instructions for the model. Note: only text should be used in parts and content in each part will be in a separate paragraph.
JSON representation |
---|
{ "model": string, "contents": [ { object ( |
SafetySetting
Safety settings.
Required. Harm category.
Required. The harm block threshold.
Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score.
JSON representation |
---|
{ "category": enum ( |
HarmCategory
Harm categories that will block the content.
Enums | |
---|---|
HARM_CATEGORY_UNSPECIFIED |
The harm category is unspecified. |
HARM_CATEGORY_HATE_SPEECH |
The harm category is hate speech. |
HARM_CATEGORY_DANGEROUS_CONTENT |
The harm category is dangerous content. |
HARM_CATEGORY_HARASSMENT |
The harm category is harassment. |
HARM_CATEGORY_SEXUALLY_EXPLICIT |
The harm category is sexually explicit content. |
HARM_CATEGORY_CIVIC_INTEGRITY |
Deprecated: Election filter is not longer supported. The harm category is civic integrity. |
HARM_CATEGORY_IMAGE_HATE |
The harm category is image hate. |
HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT |
The harm category is image dangerous content. |
HARM_CATEGORY_IMAGE_HARASSMENT |
The harm category is image harassment. |
HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT |
The harm category is image sexually explicit content. |
HarmBlockThreshold
probability based thresholds levels for blocking.
Enums | |
---|---|
HARM_BLOCK_THRESHOLD_UNSPECIFIED |
Unspecified harm block threshold. |
BLOCK_LOW_AND_ABOVE |
Block low threshold and above (i.e. block more). |
BLOCK_MEDIUM_AND_ABOVE |
Block medium threshold and above. |
BLOCK_ONLY_HIGH |
Block only high threshold (i.e. block less). |
BLOCK_NONE |
Block none. |
OFF |
Turn off the safety filter. |
HarmBlockMethod
probability vs severity.
Enums | |
---|---|
HARM_BLOCK_METHOD_UNSPECIFIED |
The harm block method is unspecified. |
SEVERITY |
The harm block method uses both probability and severity scores. |
PROBABILITY |
The harm block method uses the probability score. |