Google Cloud Ai Platform V1 Client - Class Session (1.60.0)

Reference documentation and code samples for the Google Cloud Ai Platform V1 Client class Session.

A session contains a set of actions between users and Vertex agents.

Generated from protobuf message google.cloud.aiplatform.v1.Session

Namespace

Google \ Cloud \ AIPlatform \ V1

Methods

__construct

Constructor.

Parameters
Name
Description
data
array

Optional. Data for populating the Message object.

↳ expire_time
Google\Protobuf\Timestamp

Optional. Timestamp of when this session is considered expired. This is always provided on output, regardless of what was sent on input. The minimum value is 24 hours from the time of creation.

↳ ttl
Google\Protobuf\Duration

Optional. Input only. The TTL for this session. The minimum value is 24 hours.

↳ name
string

Identifier. The resource name of the session. Format: 'projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}/sessions/{session}'.

↳ create_time
Google\Protobuf\Timestamp

Output only. Timestamp when the session was created.

↳ update_time
Google\Protobuf\Timestamp

Output only. Timestamp when the session was updated.

↳ display_name
string

Optional. The display name of the session.

↳ labels
array| Google\Protobuf\Internal\MapField

The labels with user-defined metadata to organize your Sessions. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels.

↳ session_state
Google\Protobuf\Struct

Optional. Session specific memory which stores key conversation points.

↳ user_id
string

Required. Immutable. String id provided by the user

getExpireTime

Optional. Timestamp of when this session is considered expired.

This is always provided on output, regardless of what was sent on input. The minimum value is 24 hours from the time of creation.

Returns
Type
Description

hasExpireTime

setExpireTime

Optional. Timestamp of when this session is considered expired.

This is always provided on output, regardless of what was sent on input. The minimum value is 24 hours from the time of creation.

Parameter
Name
Description
Returns
Type
Description
$this

getTtl

Optional. Input only. The TTL for this session.

The minimum value is 24 hours.

Returns
Type
Description

hasTtl

setTtl

Optional. Input only. The TTL for this session.

The minimum value is 24 hours.

Parameter
Name
Description
Returns
Type
Description
$this

getName

Identifier. The resource name of the session.

Format: 'projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}/sessions/{session}'.

Returns
Type
Description
string

setName

Identifier. The resource name of the session.

Format: 'projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}/sessions/{session}'.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getCreateTime

Output only. Timestamp when the session was created.

Returns
Type
Description

hasCreateTime

clearCreateTime

setCreateTime

Output only. Timestamp when the session was created.

Parameter
Name
Description
Returns
Type
Description
$this

getUpdateTime

Output only. Timestamp when the session was updated.

Returns
Type
Description

hasUpdateTime

clearUpdateTime

setUpdateTime

Output only. Timestamp when the session was updated.

Parameter
Name
Description
Returns
Type
Description
$this

getDisplayName

Optional. The display name of the session.

Returns
Type
Description
string

setDisplayName

Optional. The display name of the session.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getLabels

The labels with user-defined metadata to organize your Sessions.

Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels.

Returns
Type
Description

setLabels

The labels with user-defined metadata to organize your Sessions.

Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels.

Parameter
Name
Description
Returns
Type
Description
$this

getSessionState

Optional. Session specific memory which stores key conversation points.

Returns
Type
Description

hasSessionState

clearSessionState

setSessionState

Optional. Session specific memory which stores key conversation points.

Parameter
Name
Description
Returns
Type
Description
$this

getUserId

Required. Immutable. String id provided by the user

Returns
Type
Description
string

setUserId

Required. Immutable. String id provided by the user

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getExpiration

Returns
Type
Description
string
Create a Mobile Website
View Site in Mobile | Classic
Share by: