Class: Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1Interaction

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

Response for InteractionService.CreateInteraction.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GenaiVertexV1beta1Interaction

Returns a new instance of GenaiVertexV1beta1Interaction.



3423
3424
3425
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3423

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

Instance Attribute Details

#agent_interactionGoogle::Apis::AiplatformV1beta1::GenaiVertexV1beta1AgentInteraction

Interaction for generating the completion using agents. Corresponds to the JSON property agentInteraction



3259
3260
3261
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3259

def agent_interaction
  @agent_interaction
end

#contentGoogle::Apis::AiplatformV1beta1::GenaiVertexV1beta1Content

The content of the response. Corresponds to the JSON property content



3264
3265
3266
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3264

def content
  @content
end

#content_listGoogle::Apis::AiplatformV1beta1::GenaiVertexV1beta1ContentList

A list of Content. Corresponds to the JSON property contentList



3269
3270
3271
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3269

def content_list
  @content_list
end

#createdString

Required. Output only. The time at which the response was created in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). Corresponds to the JSON property created

Returns:

  • (String)


3275
3276
3277
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3275

def created
  @created
end

#env_idString

The environment ID for the interaction. Can be 'remote' for default environment. Corresponds to the JSON property envId

Returns:

  • (String)


3281
3282
3283
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3281

def env_id
  @env_id
end

#environment_idString

Output only. The environment ID for the interaction. Only populated if environment config is set in the request. Corresponds to the JSON property environmentId

Returns:

  • (String)


3287
3288
3289
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3287

def environment_id
  @environment_id
end

#idString

Required. Output only. A unique identifier for the interaction completion. Corresponds to the JSON property id

Returns:

  • (String)


3292
3293
3294
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3292

def id
  @id
end

#labelsHash<String,String>

Optional. The labels with user-defined metadata for the request. It is used for billing and reporting only. Label keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


3301
3302
3303
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3301

def labels
  @labels
end

#local_environmentGoogle::Apis::AiplatformV1beta1::GenaiVertexV1beta1LocalEnvironmentConfig

Configuration for an environment that lives on the client connection rather than in a server-managed sandbox. When set (via Interaction.local_environment), the agent's filesystem and shell are treated as living on the client: the agent's built-in environment operations (e.g. reading/listing/editing files and running commands) are suspended on the server and yielded back to the client to execute, with their results returned on a subsequent turn. This is mutually exclusive with a server-managed EnvironmentConfig ( remote_environment), since the environment is either on the client or in a server sandbox, never both. This governs only the agent's built-in environment. Client-declared function tools are always executed on the client regardless of this field. Corresponds to the JSON property localEnvironment



3316
3317
3318
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3316

def local_environment
  @local_environment
end

#model_interactionGoogle::Apis::AiplatformV1beta1::GenaiVertexV1beta1ModelInteraction

Interaction for generating the completion using models. Corresponds to the JSON property modelInteraction



3321
3322
3323
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3321

def model_interaction
  @model_interaction
end

#outputsArray<Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1Content>

Output only. Responses from the model. Corresponds to the JSON property outputs



3326
3327
3328
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3326

def outputs
  @outputs
end

#previous_interaction_idString

The ID of the previous interaction, if any. Corresponds to the JSON property previousInteractionId

Returns:

  • (String)


3331
3332
3333
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3331

def previous_interaction_id
  @previous_interaction_id
end

#remote_environmentGoogle::Apis::AiplatformV1beta1::GenaiVertexV1beta1EnvironmentConfig

Configuration for a custom environment. Corresponds to the JSON property remoteEnvironment



3336
3337
3338
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3336

def remote_environment
  @remote_environment
end

#response_formatGoogle::Apis::AiplatformV1beta1::GenaiVertexV1beta1Value

Value represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values. A producer of value is expected to set one of these variants. Absence of any variant indicates an error. Corresponds to the JSON property responseFormat



3344
3345
3346
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3344

def response_format
  @response_format
end

#response_format_listGoogle::Apis::AiplatformV1beta1::GenaiVertexV1beta1ResponseFormatList

Corresponds to the JSON property responseFormatList



3349
3350
3351
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3349

def response_format_list
  @response_format_list
end

#response_format_singletonGoogle::Apis::AiplatformV1beta1::GenaiVertexV1beta1ResponseFormat

Corresponds to the JSON property responseFormatSingleton



3354
3355
3356
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3354

def response_format_singleton
  @response_format_singleton
end

#response_mime_typeString

The mime type of the response. This is required if response_format is set. Corresponds to the JSON property responseMimeType

Returns:

  • (String)


3359
3360
3361
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3359

def response_mime_type
  @response_mime_type
end

#response_modalitiesArray<String>

The requested modalities of the response (TEXT, IMAGE, AUDIO). Corresponds to the JSON property responseModalities

Returns:

  • (Array<String>)


3364
3365
3366
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3364

def response_modalities
  @response_modalities
end

#roleString

Output only. The role of the interaction. Corresponds to the JSON property role

Returns:

  • (String)


3369
3370
3371
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3369

def role
  @role
end

#safety_settingsArray<Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1SafetySetting>

Safety settings for the interaction. Corresponds to the JSON property safety_settings



3374
3375
3376
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3374

def safety_settings
  @safety_settings
end

#statusString

Required. Output only. The status of the interaction. Corresponds to the JSON property status

Returns:

  • (String)


3379
3380
3381
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3379

def status
  @status
end

#step_listGoogle::Apis::AiplatformV1beta1::GenaiVertexV1beta1StepList

A list of Steps. Corresponds to the JSON property stepList



3384
3385
3386
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3384

def step_list
  @step_list
end

#stepsArray<Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1Step>

Required. Output only. The steps that make up the interaction. Corresponds to the JSON property steps



3389
3390
3391
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3389

def steps
  @steps
end

#string_contentString

A string input for the interaction, it will be processed as a single text input. Corresponds to the JSON property stringContent

Returns:

  • (String)


3395
3396
3397
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3395

def string_content
  @string_content
end

#system_instructionString

System instruction for the interaction. Corresponds to the JSON property systemInstruction

Returns:

  • (String)


3400
3401
3402
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3400

def system_instruction
  @system_instruction
end

#toolsArray<Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1Tool>

A list of tool declarations the model may call during interaction. Corresponds to the JSON property tools



3405
3406
3407
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3405

def tools
  @tools
end

#turn_listGoogle::Apis::AiplatformV1beta1::GenaiVertexV1beta1TurnList

A list of Turns. Corresponds to the JSON property turnList



3410
3411
3412
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3410

def turn_list
  @turn_list
end

#updatedString

Required. Output only. The time at which the response was last updated in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). Corresponds to the JSON property updated

Returns:

  • (String)


3416
3417
3418
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3416

def updated
  @updated
end

#usageGoogle::Apis::AiplatformV1beta1::GenaiVertexV1beta1InteractionUsage

Statistics on the interaction request's token usage. Corresponds to the JSON property usage



3421
3422
3423
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3421

def usage
  @usage
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3428

def update!(**args)
  @agent_interaction = args[:agent_interaction] if args.key?(:agent_interaction)
  @content = args[:content] if args.key?(:content)
  @content_list = args[:content_list] if args.key?(:content_list)
  @created = args[:created] if args.key?(:created)
  @env_id = args[:env_id] if args.key?(:env_id)
  @environment_id = args[:environment_id] if args.key?(:environment_id)
  @id = args[:id] if args.key?(:id)
  @labels = args[:labels] if args.key?(:labels)
  @local_environment = args[:local_environment] if args.key?(:local_environment)
  @model_interaction = args[:model_interaction] if args.key?(:model_interaction)
  @outputs = args[:outputs] if args.key?(:outputs)
  @previous_interaction_id = args[:previous_interaction_id] if args.key?(:previous_interaction_id)
  @remote_environment = args[:remote_environment] if args.key?(:remote_environment)
  @response_format = args[:response_format] if args.key?(:response_format)
  @response_format_list = args[:response_format_list] if args.key?(:response_format_list)
  @response_format_singleton = args[:response_format_singleton] if args.key?(:response_format_singleton)
  @response_mime_type = args[:response_mime_type] if args.key?(:response_mime_type)
  @response_modalities = args[:response_modalities] if args.key?(:response_modalities)
  @role = args[:role] if args.key?(:role)
  @safety_settings = args[:safety_settings] if args.key?(:safety_settings)
  @status = args[:status] if args.key?(:status)
  @step_list = args[:step_list] if args.key?(:step_list)
  @steps = args[:steps] if args.key?(:steps)
  @string_content = args[:string_content] if args.key?(:string_content)
  @system_instruction = args[:system_instruction] if args.key?(:system_instruction)
  @tools = args[:tools] if args.key?(:tools)
  @turn_list = args[:turn_list] if args.key?(:turn_list)
  @updated = args[:updated] if args.key?(:updated)
  @usage = args[:usage] if args.key?(:usage)
end