Class: Google::Apis::CesV1::ClientFunction

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

Overview

Represents a client-side function that the agent can invoke. When the tool is chosen by the agent, control is handed off to the client. The client is responsible for executing the function and returning the result as a ToolResponse to continue the interaction with the agent.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ClientFunction

Returns a new instance of ClientFunction.



1888
1889
1890
# File 'lib/google/apis/ces_v1/classes.rb', line 1888

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

Instance Attribute Details

#descriptionString

Optional. The function description. Corresponds to the JSON property description

Returns:

  • (String)


1871
1872
1873
# File 'lib/google/apis/ces_v1/classes.rb', line 1871

def description
  @description
end

#nameString

Required. The function name. Corresponds to the JSON property name

Returns:

  • (String)


1876
1877
1878
# File 'lib/google/apis/ces_v1/classes.rb', line 1876

def name
  @name
end

#parametersGoogle::Apis::CesV1::Schema

Represents a select subset of an OpenAPI 3.0 schema object. Corresponds to the JSON property parameters



1881
1882
1883
# File 'lib/google/apis/ces_v1/classes.rb', line 1881

def parameters
  @parameters
end

#responseGoogle::Apis::CesV1::Schema

Represents a select subset of an OpenAPI 3.0 schema object. Corresponds to the JSON property response



1886
1887
1888
# File 'lib/google/apis/ces_v1/classes.rb', line 1886

def response
  @response
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1893
1894
1895
1896
1897
1898
# File 'lib/google/apis/ces_v1/classes.rb', line 1893

def update!(**args)
  @description = args[:description] if args.key?(:description)
  @name = args[:name] if args.key?(:name)
  @parameters = args[:parameters] if args.key?(:parameters)
  @response = args[:response] if args.key?(:response)
end