sessions
Creates, updates, deletes, gets or lists a sessions resource.
Overview
| Name | sessions |
| Type | Resource |
| Id | google.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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
generate_chat_token | exec | projectsId, locationsId, appsId, sessionsId | Generates a session scoped token for chat widget to authenticate with Session APIs. | |
run_session | exec | projectsId, locationsId, appsId, sessionsId | Initiates a single-turn interaction with the CES agent within a session. | |
stream_run_session | exec | projectsId, locationsId, appsId, sessionsId | Initiates 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.
| Name | Datatype | Description |
|---|---|---|
appsId | string | |
locationsId | string | |
projectsId | string | |
sessionsId | string |
Lifecycle Methods
- generate_chat_token
- run_session
- stream_run_session
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 }}"
}'
;
Initiates a single-turn interaction with the CES agent within a session.
EXEC google.ces.sessions.run_session
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@appsId='{{ appsId }}' --required,
@sessionsId='{{ sessionsId }}' --required
@@json=
'{
"config": "{{ config }}",
"inputs": "{{ inputs }}"
}'
;
Initiates 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.
EXEC google.ces.sessions.stream_run_session
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@appsId='{{ appsId }}' --required,
@sessionsId='{{ sessionsId }}' --required
@@json=
'{
"config": "{{ config }}",
"inputs": "{{ inputs }}"
}'
;