Skip to main content

messages

Creates, updates, deletes, gets or lists a messages resource.

Overview

Namemessages
TypeResource
Idgemini.models.messages

Fields

The following fields are returned by SELECT queries:

SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
count_message_tokensexecmodelsIdRuns a model's tokenizer on a string and returns the token count.
generate_messageexecmodelsIdGenerates a response from the model given an input MessagePrompt.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
modelsIdstring

Lifecycle Methods

Runs a model's tokenizer on a string and returns the token count.

EXEC gemini.models.messages.count_message_tokens
@modelsId='{{ modelsId }}' --required
@@json=
'{
"prompt": "{{ prompt }}"
}'
;