Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Part

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

Overview

A datatype containing media that is part of a multi-part Content message. A Part consists of data which has an associated datatype. A Part can only contain one of the accepted types in Part.data. For media types that are not text, Part must have a fixed IANA MIME type identifying the type and subtype of the media if inline_data or file_data field is filled with raw bytes.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1Part

Returns a new instance of GoogleCloudAiplatformV1Part.



30144
30145
30146
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 30144

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

Instance Attribute Details

#audio_transcriptionGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1AudioTranscription

The transcription of an audio part. For multi-speaker audio, each speaker segment is a separate Part with its own AudioTranscription carrying the speaker_label. Corresponds to the JSON property audioTranscription



30067
30068
30069
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 30067

def audio_transcription
  @audio_transcription
end

#code_execution_resultGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1CodeExecutionResult

Result of executing the ExecutableCode. Generated only when the CodeExecution tool is used. Corresponds to the JSON property codeExecutionResult



30073
30074
30075
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 30073

def code_execution_result
  @code_execution_result
end

#executable_codeGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1ExecutableCode

Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the CodeExecution tool, in which the code will be automatically executed, and a corresponding CodeExecutionResult will also be generated. Corresponds to the JSON property executableCode



30081
30082
30083
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 30081

def executable_code
  @executable_code
end

#file_dataGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1FileData

URI-based data. A FileData message contains a URI pointing to data of a specific media type. It is used to represent images, audio, and video stored in Google Cloud Storage. Corresponds to the JSON property fileData



30088
30089
30090
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 30088

def file_data
  @file_data
end

#function_callGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1FunctionCall

A predicted FunctionCall returned from the model that contains a string representing the FunctionDeclaration.name and a structured JSON object containing the parameters and their values. Corresponds to the JSON property functionCall



30095
30096
30097
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 30095

def function_call
  @function_call
end

#function_responseGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1FunctionResponse

The result output from a FunctionCall that contains a string representing the FunctionDeclaration.name and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a FunctionCall made based on model prediction. Corresponds to the JSON property functionResponse



30103
30104
30105
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 30103

def function_response
  @function_response
end

#inline_dataGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1Blob

A content blob. A Blob contains data of a specific media type. It is used to represent images, audio, and video. Corresponds to the JSON property inlineData



30109
30110
30111
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 30109

def inline_data
  @inline_data
end

#media_resolutionGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1PartMediaResolution

per part media resolution. Media resolution for the input media. Corresponds to the JSON property mediaResolution



30114
30115
30116
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 30114

def media_resolution
  @media_resolution
end

#textString

Optional. The text content of the part. When sent from the VSCode Gemini Code Assist extension, references to @mentioned items will be converted to markdown boldface text. For example @my-repo will be converted to and sent as **my- repo** by the IDE agent. Corresponds to the JSON property text

Returns:

  • (String)


30122
30123
30124
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 30122

def text
  @text
end

#thoughtBoolean Also known as: thought?

Optional. Indicates whether the part represents the model's thought process or reasoning. Corresponds to the JSON property thought

Returns:

  • (Boolean)


30128
30129
30130
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 30128

def thought
  @thought
end

#thought_signatureString

Optional. An opaque signature for the thought so it can be reused in subsequent requests. Corresponds to the JSON property thoughtSignature NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


30136
30137
30138
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 30136

def thought_signature
  @thought_signature
end

#video_metadataGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1VideoMetadata

Provides metadata for a video, including the start and end offsets for clipping and the frame rate. Corresponds to the JSON property videoMetadata



30142
30143
30144
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 30142

def 
  @video_metadata
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



30149
30150
30151
30152
30153
30154
30155
30156
30157
30158
30159
30160
30161
30162
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 30149

def update!(**args)
  @audio_transcription = args[:audio_transcription] if args.key?(:audio_transcription)
  @code_execution_result = args[:code_execution_result] if args.key?(:code_execution_result)
  @executable_code = args[:executable_code] if args.key?(:executable_code)
  @file_data = args[:file_data] if args.key?(:file_data)
  @function_call = args[:function_call] if args.key?(:function_call)
  @function_response = args[:function_response] if args.key?(:function_response)
  @inline_data = args[:inline_data] if args.key?(:inline_data)
  @media_resolution = args[:media_resolution] if args.key?(:media_resolution)
  @text = args[:text] if args.key?(:text)
  @thought = args[:thought] if args.key?(:thought)
  @thought_signature = args[:thought_signature] if args.key?(:thought_signature)
  @video_metadata = args[:video_metadata] if args.key?(:video_metadata)
end