NAME
Google::Ai::Generativelanguage::V1beta::Content - Compiled Protocol Buffers messages for google/ai/generativelanguage/v1beta/content.proto
SYNOPSIS
use Google::Ai::Generativelanguage::V1beta::Content;
my $msg = Google::Ai::Generativelanguage::V1beta::Content::Content->new({
parts => $parts,
role => $role,
});
# Read or update a field
my $val = $msg->parts();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Ai::Generativelanguage::V1beta::Content::Content->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/ai/generativelanguage/v1beta/content.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().
MESSAGES
Google::Ai::Generativelanguage::V1beta::Content::Content
The base structured datatype containing multi-part content of a message.
A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn.
Inherits from Protobuf::Message.
Accessors
$msg->parts()/$msg->parts($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Content::Part)Ordered `Parts` that constitute a single message. Parts may have different MIME types.
$msg->role()/$msg->role($value)Type:
StringOptional. The producer of the content. Must be either 'user' or 'model'.
Useful to set for multi-turn conversations, otherwise can be left blank or unset.
Google::Ai::Generativelanguage::V1beta::Content::Part
A datatype containing media that is part of a multi-part `Content` message.
A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`.
A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes.
Inherits from Protobuf::Message.
Accessors
$msg->text()/$msg->text($value)Type:
StringInline text.
$msg->inline_data()/$msg->inline_data($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Content::Blob)Inline media bytes.
$msg->function_call()/$msg->function_call($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Content::FunctionCall)A predicted `FunctionCall` returned from the model that contains a string representing the `FunctionDeclaration.name` with the arguments and their values.
$msg->function_response()/$msg->function_response($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Content::FunctionResponse)The result output of a `FunctionCall` that contains a string representing the `FunctionDeclaration.name` and a structured JSON object containing any output from the function is used as context to the model.
$msg->file_data()/$msg->file_data($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Content::FileData)URI based data.
$msg->executable_code()/$msg->executable_code($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Content::ExecutableCode)Code generated by the model that is meant to be executed.
$msg->code_execution_result()/$msg->code_execution_result($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Content::CodeExecutionResult)Result of executing the `ExecutableCode`.
$msg->video_metadata()/$msg->video_metadata($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Content::VideoMetadata)Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.
$msg->thought()/$msg->thought($value)Type:
BoolOptional. Indicates if the part is thought from the model.
$msg->thought_signature()/$msg->thought_signature($value)Type:
BytesOptional. An opaque signature for the thought so it can be reused in subsequent requests.
$msg->part_metadata()/$msg->part_metadata($value)Type:
Message(Google::Protobuf::Struct::Struct)Custom metadata associated with the Part. Agents using genai.Part as content representation may need to keep track of the additional information. For example it can be name of a file/source from which the Part originates or a way to multiplex multiple Part streams.
Google::Ai::Generativelanguage::V1beta::Content::FunctionResponsePart
A datatype containing media that is part of a `FunctionResponse` message.
A `FunctionResponsePart` consists of data which has an associated datatype. A `FunctionResponsePart` can only contain one of the accepted types in `FunctionResponsePart.data`.
A `FunctionResponsePart` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes.
Inherits from Protobuf::Message.
Accessors
$msg->inline_data()/$msg->inline_data($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Content::FunctionResponseBlob)Inline media bytes.
Google::Ai::Generativelanguage::V1beta::Content::Blob
Raw media bytes.
Text should not be sent as raw bytes, use the 'text' field.
Inherits from Protobuf::Message.
Accessors
$msg->mime_type()/$msg->mime_type($value)Type:
StringThe IANA standard MIME type of the source data. Examples: - image/png - image/jpeg If an unsupported MIME type is provided, an error will be returned. For a complete list of supported types, see [Supported file formats](https://ai.google.dev/gemini-api/docs/prompting_with_media#supported_file_formats).
$msg->data()/$msg->data($value)Type:
BytesRaw bytes for media formats.
Google::Ai::Generativelanguage::V1beta::Content::FunctionResponseBlob
Raw media bytes for function response.
Text should not be sent as raw bytes, use the 'FunctionResponse.response' field.
Inherits from Protobuf::Message.
Accessors
$msg->mime_type()/$msg->mime_type($value)Type:
StringThe IANA standard MIME type of the source data. Examples: - image/png - image/jpeg If an unsupported MIME type is provided, an error will be returned. For a complete list of supported types, see [Supported file formats](https://ai.google.dev/gemini-api/docs/prompting_with_media#supported_file_formats).
$msg->data()/$msg->data($value)Type:
BytesRaw bytes for media formats.
Google::Ai::Generativelanguage::V1beta::Content::FileData
URI based data.
Inherits from Protobuf::Message.
Accessors
$msg->mime_type()/$msg->mime_type($value)Type:
StringOptional. The IANA standard MIME type of the source data.
$msg->file_uri()/$msg->file_uri($value)Type:
StringRequired. URI.
Google::Ai::Generativelanguage::V1beta::Content::VideoMetadata
Metadata describes the input video content.
Inherits from Protobuf::Message.
Accessors
$msg->start_offset()/$msg->start_offset($value)Type:
Message(Google::Protobuf::Duration::Duration)Optional. The start offset of the video.
$msg->end_offset()/$msg->end_offset($value)Type:
Message(Google::Protobuf::Duration::Duration)Optional. The end offset of the video.
$msg->fps()/$msg->fps($value)Type:
DoubleOptional. The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0].
Google::Ai::Generativelanguage::V1beta::Content::ExecutableCode
Code generated by the model that is meant to be executed, and the result returned to the model.
Only generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding `CodeExecutionResult` will also be generated.
Inherits from Protobuf::Message.
Accessors
$msg->language()/$msg->language($value)Type:
Enum(Google::Ai::Generativelanguage::V1beta::ExecutableCode::Language)Required. Programming language of the `code`.
$msg->code()/$msg->code($value)Type:
StringRequired. The code to be executed.
Enum: ExecutableCode::Language
LANGUAGE_UNSPECIFIED=>0PYTHON=>1
Google::Ai::Generativelanguage::V1beta::Content::CodeExecutionResult
Result of executing the `ExecutableCode`.
Only generated when using the `CodeExecution`, and always follows a `part` containing the `ExecutableCode`.
Inherits from Protobuf::Message.
Accessors
$msg->outcome()/$msg->outcome($value)Type:
Enum(Google::Ai::Generativelanguage::V1beta::CodeExecutionResult::Outcome)Required. Outcome of the code execution.
$msg->output()/$msg->output($value)Type:
StringOptional. Contains stdout when code execution is successful, stderr or other description otherwise.
Enum: CodeExecutionResult::Outcome
OUTCOME_UNSPECIFIED=>0OUTCOME_OK=>1OUTCOME_FAILED=>2OUTCOME_DEADLINE_EXCEEDED=>3
Google::Ai::Generativelanguage::V1beta::Content::Tool
Tool details that the model may use to generate 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.
Next ID: 12
Inherits from Protobuf::Message.
Accessors
$msg->function_declarations()/$msg->function_declarations($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Content::FunctionDeclaration)Optional. A list of `FunctionDeclarations` available to the model that can be used for function calling.
The model or system does not execute the function. Instead the defined function may be returned as a [FunctionCall][google.ai.generativelanguage.v1beta.Part.function_call] with arguments to the client side for execution. The model may decide to call a subset of these functions by populating [FunctionCall][google.ai.generativelanguage.v1beta.Part.function_call] in the response. The next conversation turn may contain a [FunctionResponse][google.ai.generativelanguage.v1beta.Part.function_response] with the [Content.role][google.ai.generativelanguage.v1beta.Content.role] "function" generation context for the next model turn.
$msg->google_search_retrieval()/$msg->google_search_retrieval($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Content::GoogleSearchRetrieval)Optional. Retrieval tool that is powered by Google search.
$msg->code_execution()/$msg->code_execution($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Content::CodeExecution)Optional. Enables the model to execute code as part of generation.
$msg->google_search()/$msg->google_search($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Content::Tool::GoogleSearch)Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.
$msg->computer_use()/$msg->computer_use($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Content::Tool::ComputerUse)Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations.
$msg->url_context()/$msg->url_context($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Content::UrlContext)Optional. Tool to support URL context retrieval.
$msg->file_search()/$msg->file_search($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Content::FileSearch)Optional. FileSearch tool type. Tool to retrieve knowledge from Semantic Retrieval corpora.
$msg->google_maps()/$msg->google_maps($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Content::GoogleMaps)Optional. Tool that allows grounding the model's response with geospatial context related to the user's query.
Google::Ai::Generativelanguage::V1beta::Content::GoogleMaps
The GoogleMaps Tool that provides geospatial context for the user's query.
Inherits from Protobuf::Message.
Accessors
$msg->enable_widget()/$msg->enable_widget($value)Type:
BoolOptional. Whether to return a widget context token in the GroundingMetadata of the response. Developers can use the widget context token to render a Google Maps widget with geospatial context related to the places that the model references in the response.
Google::Ai::Generativelanguage::V1beta::Content::UrlContext
Tool to support URL context retrieval.
Inherits from Protobuf::Message.
Google::Ai::Generativelanguage::V1beta::Content::FileSearch
The FileSearch tool that retrieves knowledge from Semantic Retrieval corpora. Files are imported to Semantic Retrieval corpora using the ImportFile API.
Inherits from Protobuf::Message.
Accessors
$msg->retrieval_resources()/$msg->retrieval_resources($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Content::FileSearch::RetrievalResource)Required. Semantic retrieval resources to retrieve from. Currently only supports one corpus. In the future we may open up multiple corpora support.
$msg->retrieval_config()/$msg->retrieval_config($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Content::FileSearch::RetrievalConfig)Optional. The configuration for the retrieval.
Google::Ai::Generativelanguage::V1beta::Content::GoogleSearchRetrieval
Tool to retrieve public web data for grounding, powered by Google.
Inherits from Protobuf::Message.
Accessors
$msg->dynamic_retrieval_config()/$msg->dynamic_retrieval_config($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Content::DynamicRetrievalConfig)Specifies the dynamic retrieval configuration for the given source.
Google::Ai::Generativelanguage::V1beta::Content::DynamicRetrievalConfig
Describes the options to customize dynamic retrieval.
Inherits from Protobuf::Message.
Accessors
$msg->mode()/$msg->mode($value)Type:
Enum(Google::Ai::Generativelanguage::V1beta::DynamicRetrievalConfig::Mode)The mode of the predictor to be used in dynamic retrieval.
$msg->dynamic_threshold()/$msg->dynamic_threshold($value)Type:
FloatThe threshold to be used in dynamic retrieval. If not set, a system default value is used.
Enum: DynamicRetrievalConfig::Mode
MODE_UNSPECIFIED=>0MODE_DYNAMIC=>1
Google::Ai::Generativelanguage::V1beta::Content::CodeExecution
Tool that executes code generated by the model, and automatically returns the result to the model.
See also `ExecutableCode` and `CodeExecutionResult` which are only generated when using this tool.
Inherits from Protobuf::Message.
Google::Ai::Generativelanguage::V1beta::Content::ToolConfig
The Tool configuration containing parameters for specifying `Tool` use in the request.
Inherits from Protobuf::Message.
Accessors
$msg->function_calling_config()/$msg->function_calling_config($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Content::FunctionCallingConfig)Optional. Function calling config.
$msg->retrieval_config()/$msg->retrieval_config($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Content::RetrievalConfig)Optional. Retrieval config.
Google::Ai::Generativelanguage::V1beta::Content::RetrievalConfig
Retrieval config.
Inherits from Protobuf::Message.
Accessors
$msg->lat_lng()/$msg->lat_lng($value)Type:
Message(Google::Type::Latlng::LatLng)Optional. The location of the user.
$msg->language_code()/$msg->language_code($value)Type:
StringOptional. The language code of the user. Language code for content. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
Google::Ai::Generativelanguage::V1beta::Content::FunctionCallingConfig
Configuration for specifying function calling behavior.
Inherits from Protobuf::Message.
Accessors
$msg->mode()/$msg->mode($value)Type:
Enum(Google::Ai::Generativelanguage::V1beta::FunctionCallingConfig::Mode)Optional. Specifies the mode in which function calling should execute. If unspecified, the default value will be set to AUTO.
$msg->allowed_function_names()/$msg->allowed_function_names($value)Type:
StringOptional. A set of function names that, when provided, limits the functions the model will call.
This should only be set when the Mode is ANY or VALIDATED. Function names should match [FunctionDeclaration.name]. When set, model will predict a function call from only allowed function names.
Enum: FunctionCallingConfig::Mode
MODE_UNSPECIFIED=>0AUTO=>1ANY=>2NONE=>3VALIDATED=>4
Google::Ai::Generativelanguage::V1beta::Content::FunctionDeclaration
Structured representation of a function declaration as defined by the [OpenAPI 3.03 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name and parameters. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. The name of the function. Must be a-z, A-Z, 0-9, or contain underscores, colons, dots, and dashes, with a maximum length of 64.
$msg->description()/$msg->description($value)Type:
StringRequired. A brief description of the function.
$msg->parameters()/$msg->parameters($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Content::Schema)Optional. Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter.
$msg->parameters_json_schema()/$msg->parameters_json_schema($value)Type:
Message(Google::Protobuf::Struct::Value)Optional. Describes the parameters to the function in JSON Schema format. The schema must describe an object where the properties are the parameters to the function. For example:
``` { "type": "object", "properties": { "name": { "type": "string" }, "age": { "type": "integer" } }, "additionalProperties": false, "required": ["name", "age"], "propertyOrdering": ["name", "age"] } ```
This field is mutually exclusive with `parameters`.
$msg->response()/$msg->response($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Content::Schema)Optional. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function.
$msg->response_json_schema()/$msg->response_json_schema($value)Type:
Message(Google::Protobuf::Struct::Value)Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function.
This field is mutually exclusive with `response`.
$msg->behavior()/$msg->behavior($value)Type:
Enum(Google::Ai::Generativelanguage::V1beta::FunctionDeclaration::Behavior)Optional. Specifies the function Behavior. Currently only supported by the BidiGenerateContent method.
Enum: FunctionDeclaration::Behavior
UNSPECIFIED=>0BLOCKING=>1NON_BLOCKING=>2
Google::Ai::Generativelanguage::V1beta::Content::FunctionCall
A predicted `FunctionCall` returned from the model that contains a string representing the `FunctionDeclaration.name` with the arguments and their values.
Inherits from Protobuf::Message.
Accessors
$msg->id()/$msg->id($value)Type:
StringOptional. The unique id of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`.
$msg->name()/$msg->name($value)Type:
StringRequired. The name of the function to call. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
$msg->args()/$msg->args($value)Type:
Message(Google::Protobuf::Struct::Struct)Optional. The function parameters and values in JSON object format.
Google::Ai::Generativelanguage::V1beta::Content::FunctionResponse
The result output from a `FunctionCall` that contains a string representing the `FunctionDeclaration.name` and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a`FunctionCall` made based on model prediction.
Inherits from Protobuf::Message.
Accessors
$msg->id()/$msg->id($value)Type:
StringOptional. The id of the function call this response is for. Populated by the client to match the corresponding function call `id`.
$msg->name()/$msg->name($value)Type:
StringRequired. The name of the function to call. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
$msg->response()/$msg->response($value)Type:
Message(Google::Protobuf::Struct::Struct)Required. The function response in JSON object format. Callers can use any keys of their choice that fit the function's syntax to return the function output, e.g. "output", "result", etc. In particular, if the function call failed to execute, the response can have an "error" key to return error details to the model.
$msg->parts()/$msg->parts($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Content::FunctionResponsePart)Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types.
$msg->will_continue()/$msg->will_continue($value)Type:
BoolOptional. Signals that function call continues, and more responses will be returned, turning the function call into a generator. Is only applicable to NON_BLOCKING function calls, is ignored otherwise. If set to false, future responses will not be considered. It is allowed to return empty `response` with `will_continue=False` to signal that the function call is finished. This may still trigger the model generation. To avoid triggering the generation and finish the function call, additionally set `scheduling` to `SILENT`.
$msg->scheduling()/$msg->scheduling($value)Type:
Enum(Google::Ai::Generativelanguage::V1beta::FunctionResponse::Scheduling)Optional. Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE.
Enum: FunctionResponse::Scheduling
SCHEDULING_UNSPECIFIED=>0SILENT=>1WHEN_IDLE=>2INTERRUPT=>3
Google::Ai::Generativelanguage::V1beta::Content::Schema
The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema).
Inherits from Protobuf::Message.
Accessors
$msg->type()/$msg->type($value)Type:
Enum(Google::Ai::Generativelanguage::V1beta::Type)Required. Data type.
$msg->format()/$msg->format($value)Type:
StringOptional. The format of the data. Any value is allowed, but most do not trigger any special functionality.
$msg->title()/$msg->title($value)Type:
StringOptional. The title of the schema.
$msg->description()/$msg->description($value)Type:
StringOptional. A brief description of the parameter. This could contain examples of use. Parameter description may be formatted as Markdown.
$msg->nullable()/$msg->nullable($value)Type:
BoolOptional. Indicates if the value may be null.
$msg->enum()/$msg->enum($value)Type:
StringOptional. Possible values of the element of Type.STRING with enum format. For example we can define an Enum Direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
$msg->items()/$msg->items($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Content::Schema)Optional. Schema of the elements of Type.ARRAY.
$msg->max_items()/$msg->max_items($value)Type:
Int64Optional. Maximum number of the elements for Type.ARRAY.
$msg->min_items()/$msg->min_items($value)Type:
Int64Optional. Minimum number of the elements for Type.ARRAY.
$msg->properties()/$msg->properties($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Content::Schema::PropertiesEntry)Optional. Properties of Type.OBJECT.
$msg->required()/$msg->required($value)Type:
StringOptional. Required properties of Type.OBJECT.
$msg->min_properties()/$msg->min_properties($value)Type:
Int64Optional. Minimum number of the properties for Type.OBJECT.
$msg->max_properties()/$msg->max_properties($value)Type:
Int64Optional. Maximum number of the properties for Type.OBJECT.
$msg->minimum()/$msg->minimum($value)Type:
DoubleOptional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER
$msg->maximum()/$msg->maximum($value)Type:
DoubleOptional. Maximum value of the Type.INTEGER and Type.NUMBER
$msg->min_length()/$msg->min_length($value)Type:
Int64Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING
$msg->max_length()/$msg->max_length($value)Type:
Int64Optional. Maximum length of the Type.STRING
$msg->pattern()/$msg->pattern($value)Type:
StringOptional. Pattern of the Type.STRING to restrict a string to a regular expression.
$msg->example()/$msg->example($value)Type:
Message(Google::Protobuf::Struct::Value)Optional. Example of the object. Will only populated when the object is the root.
$msg->any_of()/$msg->any_of($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Content::Schema)Optional. The value should be validated against any (one or more) of the subschemas in the list.
$msg->property_ordering()/$msg->property_ordering($value)Type:
StringOptional. The order of the properties. Not a standard field in open api spec. Used to determine the order of the properties in the response.
$msg->default()/$msg->default($value)Type:
Message(Google::Protobuf::Struct::Value)Optional. Default value of the field. Per JSON Schema, this field is intended for documentation generators and doesn't affect validation. Thus it's included here and ignored so that developers who send schemas with a `default` field don't get unknown-field errors.
Google::Ai::Generativelanguage::V1beta::Content::GroundingPassage
Passage included inline with a grounding configuration.
Inherits from Protobuf::Message.
Accessors
$msg->id()/$msg->id($value)Type:
StringIdentifier for the passage for attributing this passage in grounded answers.
$msg->content()/$msg->content($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Content::Content)Content of the passage.
Google::Ai::Generativelanguage::V1beta::Content::GroundingPassages
A repeated list of passages.
Inherits from Protobuf::Message.
Accessors
$msg->passages()/$msg->passages($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::Content::GroundingPassage)List of passages.
Google::Ai::Generativelanguage::V1beta::Content::ModalityTokenCount
Represents token counting info for a single modality.
Inherits from Protobuf::Message.
Accessors
$msg->modality()/$msg->modality($value)Type:
Enum(Google::Ai::Generativelanguage::V1beta::Modality)The modality associated with this token count.
$msg->token_count()/$msg->token_count($value)Type:
Int32Number of tokens.
SEE ALSO
Protobuf, Protobuf::Message, Google::Ai::Generativelanguage::V1beta::Content::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.