Class: Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1Interaction
- Inherits:
-
Object
- Object
- Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1Interaction
- 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
-
#agent_interaction ⇒ Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1AgentInteraction
Interaction for generating the completion using agents.
-
#content ⇒ Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1Content
The content of the response.
-
#content_list ⇒ Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1ContentList
A list of Content.
-
#created ⇒ String
Required.
-
#env_id ⇒ String
The environment ID for the interaction.
-
#environment_id ⇒ String
Output only.
-
#errors ⇒ Array<Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1Error>
Output only.
-
#id ⇒ String
Required.
-
#labels ⇒ Hash<String,String>
Optional.
-
#local_environment ⇒ Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1LocalEnvironmentConfig
Configuration for an environment that lives on the client connection rather than in a server-managed sandbox.
-
#model_interaction ⇒ Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1ModelInteraction
Interaction for generating the completion using models.
-
#outputs ⇒ Array<Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1Content>
Output only.
-
#previous_interaction_id ⇒ String
The ID of the previous interaction, if any.
-
#remote_environment ⇒ Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1EnvironmentConfig
Configuration for a custom environment.
-
#response_format ⇒ Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1Value
Valuerepresents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values. -
#response_format_list ⇒ Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1ResponseFormatList
Corresponds to the JSON property
responseFormatList. -
#response_format_singleton ⇒ Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1ResponseFormat
Corresponds to the JSON property
responseFormatSingleton. -
#response_mime_type ⇒ String
The mime type of the response.
-
#response_modalities ⇒ Array<String>
The requested modalities of the response (TEXT, IMAGE, AUDIO).
-
#role ⇒ String
Output only.
-
#safety_settings ⇒ Array<Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1SafetySetting>
Safety settings for the interaction.
-
#service_tier ⇒ String
The service tier for the interaction.
-
#status ⇒ String
Required.
-
#step_list ⇒ Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1StepList
A list of Steps.
-
#steps ⇒ Array<Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1Step>
Required.
-
#string_content ⇒ String
A string input for the interaction, it will be processed as a single text input.
-
#system_instruction ⇒ String
System instruction for the interaction.
-
#tools ⇒ Array<Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1Tool>
A list of tool declarations the model may call during interaction.
-
#turn_list ⇒ Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1TurnList
A list of Turns.
-
#updated ⇒ String
Required.
-
#usage ⇒ Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1InteractionUsage
Statistics on the interaction request's token usage.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GenaiVertexV1beta1Interaction
constructor
A new instance of GenaiVertexV1beta1Interaction.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GenaiVertexV1beta1Interaction
Returns a new instance of GenaiVertexV1beta1Interaction.
3878 3879 3880 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3878 def initialize(**args) update!(**args) end |
Instance Attribute Details
#agent_interaction ⇒ Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1AgentInteraction
Interaction for generating the completion using agents.
Corresponds to the JSON property agentInteraction
3704 3705 3706 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3704 def agent_interaction @agent_interaction end |
#content ⇒ Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1Content
The content of the response.
Corresponds to the JSON property content
3709 3710 3711 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3709 def content @content end |
#content_list ⇒ Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1ContentList
A list of Content.
Corresponds to the JSON property contentList
3714 3715 3716 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3714 def content_list @content_list end |
#created ⇒ String
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
3720 3721 3722 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3720 def created @created end |
#env_id ⇒ String
The environment ID for the interaction. Can be 'remote' for default
environment.
Corresponds to the JSON property envId
3726 3727 3728 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3726 def env_id @env_id end |
#environment_id ⇒ String
Output only. The environment ID for the interaction. Only populated if
environment config is set in the request.
Corresponds to the JSON property environmentId
3732 3733 3734 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3732 def environment_id @environment_id end |
#errors ⇒ Array<Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1Error>
Output only. Diagnostic faults / platform errors recorded on the interaction.
Corresponds to the JSON property errors
3737 3738 3739 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3737 def errors @errors end |
#id ⇒ String
Required. Output only. A unique identifier for the interaction completion.
Corresponds to the JSON property id
3742 3743 3744 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3742 def id @id end |
#labels ⇒ Hash<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
3751 3752 3753 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3751 def labels @labels end |
#local_environment ⇒ Google::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
3766 3767 3768 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3766 def local_environment @local_environment end |
#model_interaction ⇒ Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1ModelInteraction
Interaction for generating the completion using models.
Corresponds to the JSON property modelInteraction
3771 3772 3773 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3771 def model_interaction @model_interaction end |
#outputs ⇒ Array<Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1Content>
Output only. Responses from the model.
Corresponds to the JSON property outputs
3776 3777 3778 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3776 def outputs @outputs end |
#previous_interaction_id ⇒ String
The ID of the previous interaction, if any.
Corresponds to the JSON property previousInteractionId
3781 3782 3783 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3781 def previous_interaction_id @previous_interaction_id end |
#remote_environment ⇒ Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1EnvironmentConfig
Configuration for a custom environment.
Corresponds to the JSON property remoteEnvironment
3786 3787 3788 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3786 def remote_environment @remote_environment end |
#response_format ⇒ Google::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
3794 3795 3796 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3794 def response_format @response_format end |
#response_format_list ⇒ Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1ResponseFormatList
Corresponds to the JSON property responseFormatList
3799 3800 3801 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3799 def response_format_list @response_format_list end |
#response_format_singleton ⇒ Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1ResponseFormat
Corresponds to the JSON property responseFormatSingleton
3804 3805 3806 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3804 def response_format_singleton @response_format_singleton end |
#response_mime_type ⇒ String
The mime type of the response. This is required if response_format is set.
Corresponds to the JSON property responseMimeType
3809 3810 3811 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3809 def response_mime_type @response_mime_type end |
#response_modalities ⇒ Array<String>
The requested modalities of the response (TEXT, IMAGE, AUDIO).
Corresponds to the JSON property responseModalities
3814 3815 3816 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3814 def response_modalities @response_modalities end |
#role ⇒ String
Output only. The role of the interaction.
Corresponds to the JSON property role
3819 3820 3821 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3819 def role @role end |
#safety_settings ⇒ Array<Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1SafetySetting>
Safety settings for the interaction.
Corresponds to the JSON property safetySettings
3824 3825 3826 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3824 def safety_settings @safety_settings end |
#service_tier ⇒ String
The service tier for the interaction.
Corresponds to the JSON property serviceTier
3829 3830 3831 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3829 def service_tier @service_tier end |
#status ⇒ String
Required. Output only. The status of the interaction.
Corresponds to the JSON property status
3834 3835 3836 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3834 def status @status end |
#step_list ⇒ Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1StepList
A list of Steps.
Corresponds to the JSON property stepList
3839 3840 3841 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3839 def step_list @step_list end |
#steps ⇒ Array<Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1Step>
Required. Output only. The steps that make up the interaction.
Corresponds to the JSON property steps
3844 3845 3846 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3844 def steps @steps end |
#string_content ⇒ String
A string input for the interaction, it will be processed as a single text
input.
Corresponds to the JSON property stringContent
3850 3851 3852 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3850 def string_content @string_content end |
#system_instruction ⇒ String
System instruction for the interaction.
Corresponds to the JSON property systemInstruction
3855 3856 3857 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3855 def system_instruction @system_instruction end |
#tools ⇒ Array<Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1Tool>
A list of tool declarations the model may call during interaction.
Corresponds to the JSON property tools
3860 3861 3862 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3860 def tools @tools end |
#turn_list ⇒ Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1TurnList
A list of Turns.
Corresponds to the JSON property turnList
3865 3866 3867 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3865 def turn_list @turn_list end |
#updated ⇒ String
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
3871 3872 3873 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3871 def updated @updated end |
#usage ⇒ Google::Apis::AiplatformV1beta1::GenaiVertexV1beta1InteractionUsage
Statistics on the interaction request's token usage.
Corresponds to the JSON property usage
3876 3877 3878 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3876 def usage @usage end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3883 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) @errors = args[:errors] if args.key?(:errors) @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) @service_tier = args[:service_tier] if args.key?(:service_tier) @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 |