Class: Google::Apis::CesV1::MockedToolCall

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

A mocked tool call. Expresses the target tool + a pattern to match against that tool's args / inputs. If the pattern matches, then the mock response will be returned.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ MockedToolCall

Returns a new instance of MockedToolCall.



4698
4699
4700
# File 'lib/google/apis/ces_v1/classes.rb', line 4698

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

Instance Attribute Details

#expected_args_patternHash<String,Object>

Required. A pattern to match against the args / inputs of all dispatched tool calls. If the tool call inputs match this pattern, then mock output will be returned. Corresponds to the JSON property expectedArgsPattern

Returns:

  • (Hash<String,Object>)


4674
4675
4676
# File 'lib/google/apis/ces_v1/classes.rb', line 4674

def expected_args_pattern
  @expected_args_pattern
end

#mock_responseHash<String,Object>

Optional. The mock response / output to return if the tool call args / inputs match the pattern. Corresponds to the JSON property mockResponse

Returns:

  • (Hash<String,Object>)


4680
4681
4682
# File 'lib/google/apis/ces_v1/classes.rb', line 4680

def mock_response
  @mock_response
end

#toolString

Optional. Deprecated. Use tool_identifier instead. Corresponds to the JSON property tool

Returns:

  • (String)


4685
4686
4687
# File 'lib/google/apis/ces_v1/classes.rb', line 4685

def tool
  @tool
end

#tool_idString

Optional. The name of the tool to mock. Format: projects/project/locations/ location/apps/app/tools/tool` Corresponds to the JSON propertytoolId`

Returns:

  • (String)


4691
4692
4693
# File 'lib/google/apis/ces_v1/classes.rb', line 4691

def tool_id
  @tool_id
end

#toolsetGoogle::Apis::CesV1::ToolsetTool

A tool that is created from a toolset. Corresponds to the JSON property toolset



4696
4697
4698
# File 'lib/google/apis/ces_v1/classes.rb', line 4696

def toolset
  @toolset
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4703
4704
4705
4706
4707
4708
4709
# File 'lib/google/apis/ces_v1/classes.rb', line 4703

def update!(**args)
  @expected_args_pattern = args[:expected_args_pattern] if args.key?(:expected_args_pattern)
  @mock_response = args[:mock_response] if args.key?(:mock_response)
  @tool = args[:tool] if args.key?(:tool)
  @tool_id = args[:tool_id] if args.key?(:tool_id)
  @toolset = args[:toolset] if args.key?(:toolset)
end