Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1SessionEvent

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/aiplatform_v1beta1/classes.rb,
lib/google/apis/aiplatform_v1beta1/representations.rb,
lib/google/apis/aiplatform_v1beta1/representations.rb

Overview

An event represents a message from either the user or agent.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1SessionEvent

Returns a new instance of GoogleCloudAiplatformV1beta1SessionEvent.



50433
50434
50435
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50433

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#actionsGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1EventActions

Actions are parts of events that are executed by the agent. Corresponds to the JSON property actions



50381
50382
50383
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50381

def actions
  @actions
end

#authorString

Required. The name of the agent that sent the event, or user. Corresponds to the JSON property author

Returns:

  • (String)


50386
50387
50388
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50386

def author
  @author
end

#contentGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Content

The structured data content of a message. A Content message contains a role field, which indicates the producer of the content, and a parts field, which contains the multi-part data of the message. Corresponds to the JSON property content



50393
50394
50395
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50393

def content
  @content
end

#error_codeString

Optional. Error code if the response is an error. Code varies by model. Corresponds to the JSON property errorCode

Returns:

  • (String)


50398
50399
50400
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50398

def error_code
  @error_code
end

#error_messageString

Optional. Error message if the response is an error. Corresponds to the JSON property errorMessage

Returns:

  • (String)


50403
50404
50405
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50403

def error_message
  @error_message
end

#event_metadataGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1EventMetadata

Metadata relating to a LLM response event. Corresponds to the JSON property eventMetadata



50408
50409
50410
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50408

def 
  @event_metadata
end

#invocation_idString

Required. The invocation id of the event, multiple events can have the same invocation id. Corresponds to the JSON property invocationId

Returns:

  • (String)


50414
50415
50416
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50414

def invocation_id
  @invocation_id
end

#nameString

Identifier. The resource name of the event. Format:projects/project/ locations/location/reasoningEngines/reasoning_engine/sessions/session/ events/event`. Corresponds to the JSON propertyname`

Returns:

  • (String)


50421
50422
50423
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50421

def name
  @name
end

#raw_eventHash<String,Object>

Optional. Weakly typed raw event data in proto struct format. Corresponds to the JSON property rawEvent

Returns:

  • (Hash<String,Object>)


50426
50427
50428
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50426

def raw_event
  @raw_event
end

#timestampString

Required. Timestamp when the event was created on client side. Corresponds to the JSON property timestamp

Returns:

  • (String)


50431
50432
50433
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50431

def timestamp
  @timestamp
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



50438
50439
50440
50441
50442
50443
50444
50445
50446
50447
50448
50449
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 50438

def update!(**args)
  @actions = args[:actions] if args.key?(:actions)
  @author = args[:author] if args.key?(:author)
  @content = args[:content] if args.key?(:content)
  @error_code = args[:error_code] if args.key?(:error_code)
  @error_message = args[:error_message] if args.key?(:error_message)
  @event_metadata = args[:event_metadata] if args.key?(:event_metadata)
  @invocation_id = args[:invocation_id] if args.key?(:invocation_id)
  @name = args[:name] if args.key?(:name)
  @raw_event = args[:raw_event] if args.key?(:raw_event)
  @timestamp = args[:timestamp] if args.key?(:timestamp)
end