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.



3119
3120
3121
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3119

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



3001
3002
3003
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3001

def agent_interaction
  @agent_interaction
end

#contentGoogle::Apis::AiplatformV1beta1::GenaiVertexV1beta1Content

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



3006
3007
3008
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3006

def content
  @content
end

#content_listGoogle::Apis::AiplatformV1beta1::GenaiVertexV1beta1ContentList

A list of Content. Corresponds to the JSON property contentList



3011
3012
3013
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3011

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)


3017
3018
3019
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3017

def created
  @created
end

#idString

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

Returns:

  • (String)


3022
3023
3024
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3022

def id
  @id
end

#model_interactionGoogle::Apis::AiplatformV1beta1::GenaiVertexV1beta1ModelInteraction

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



3027
3028
3029
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3027

def model_interaction
  @model_interaction
end

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

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



3032
3033
3034
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3032

def outputs
  @outputs
end

#previous_interaction_idString

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

Returns:

  • (String)


3037
3038
3039
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3037

def previous_interaction_id
  @previous_interaction_id
end

#response_formatGoogle::Apis::AiplatformV1beta1::GenaiValue

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 response_format



3055
3056
3057
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3055

def response_format
  @response_format
end

#response_format_listGoogle::Apis::AiplatformV1beta1::GenaiVertexV1beta1ResponseFormatList

Corresponds to the JSON property responseFormatList



3042
3043
3044
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3042

def response_format_list
  @response_format_list
end

#response_format_singletonGoogle::Apis::AiplatformV1beta1::GenaiVertexV1beta1ResponseFormat

Corresponds to the JSON property responseFormatSingleton



3047
3048
3049
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3047

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 response_mime_type

Returns:

  • (String)


3060
3061
3062
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3060

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 response_modalities

Returns:

  • (Array<String>)


3065
3066
3067
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3065

def response_modalities
  @response_modalities
end

#roleString

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

Returns:

  • (String)


3070
3071
3072
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3070

def role
  @role
end

#statusString

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

Returns:

  • (String)


3075
3076
3077
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3075

def status
  @status
end

#step_listGoogle::Apis::AiplatformV1beta1::GenaiVertexV1beta1StepList

A list of Steps. Corresponds to the JSON property stepList



3080
3081
3082
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3080

def step_list
  @step_list
end

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

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



3085
3086
3087
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3085

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)


3091
3092
3093
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3091

def string_content
  @string_content
end

#system_instructionString

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

Returns:

  • (String)


3096
3097
3098
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3096

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



3101
3102
3103
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3101

def tools
  @tools
end

#turn_listGoogle::Apis::AiplatformV1beta1::GenaiVertexV1beta1TurnList

A list of Turns. Corresponds to the JSON property turnList



3106
3107
3108
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3106

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)


3112
3113
3114
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3112

def updated
  @updated
end

#usageGoogle::Apis::AiplatformV1beta1::GenaiVertexV1beta1InteractionUsage

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



3117
3118
3119
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3117

def usage
  @usage
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3124

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)
  @id = args[:id] if args.key?(:id)
  @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)
  @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_format = args[:response_format] if args.key?(:response_format)
  @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)
  @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