Skip to main content

sessions

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

Overview​

Namesessions
TypeResource
Idgoogle.ces.sessions

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
generate_chat_tokenexecprojectsId, locationsId, appsId, sessionsIdGenerates a session scoped token for chat widget to authenticate with Session APIs.
run_sessionexecprojectsId, locationsId, appsId, sessionsIdInitiates a single-turn interaction with the CES agent within a session.
stream_run_sessionexecprojectsId, locationsId, appsId, sessionsIdInitiates a single-turn interaction with the CES agent. Uses server-side streaming to deliver incremental results and partial responses as they are generated. By default, complete responses (e.g., messages from callbacks or full LLM responses) are sent to the client as soon as they are available. To enable streaming individual text chunks directly from the model, set enable_text_streaming to true.

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
appsIdstring
locationsIdstring
projectsIdstring
sessionsIdstring

Lifecycle Methods​

Generates a session scoped token for chat widget to authenticate with Session APIs.

EXEC google.ces.sessions.generate_chat_token
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@appsId='{{ appsId }}' --required,
@sessionsId='{{ sessionsId }}' --required
@@json=
'{
"deployment": "{{ deployment }}",
"liveHandoffEnabled": {{ liveHandoffEnabled }},
"recaptchaToken": "{{ recaptchaToken }}"
}'
;