REST Resource: projects.agent.sessions.contexts

Resource: Context

Represents a context.

JSON representation
{
  "name": string,
  "lifespanCount": number,
  "parameters": {
    object
  }
}
Fields
name

string

Required. The unique identifier of the context. Format: projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>, or projects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session ID>/contexts/<Context ID>. Note: Environments and users are under construction and will be available soon. The Context ID is always converted to lowercase. If Environment ID is not specified, we assume default 'draft' environment. If User ID is not specified, we assume default '-' user.

lifespanCount

number

Optional. The number of conversational query requests after which the context expires. If set to 0 (the default) the context expires immediately. Contexts expire automatically after 10 minutes even if there are no matching queries.

parameters

object (Struct format)

Optional. The collection of parameters associated with this context. Refer to this doc for syntax.

Methods

create

Creates a context.

delete

Deletes the specified context.

get

Retrieves the specified context.

list

Returns the list of all contexts in the specified session.

patch

Updates the specified context.