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.



4865
4866
4867
# File 'lib/google/apis/ces_v1/classes.rb', line 4865

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>)


4841
4842
4843
# File 'lib/google/apis/ces_v1/classes.rb', line 4841

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>)


4847
4848
4849
# File 'lib/google/apis/ces_v1/classes.rb', line 4847

def mock_response
  @mock_response
end

#toolString

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

Returns:

  • (String)


4852
4853
4854
# File 'lib/google/apis/ces_v1/classes.rb', line 4852

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)


4858
4859
4860
# File 'lib/google/apis/ces_v1/classes.rb', line 4858

def tool_id
  @tool_id
end

#toolsetGoogle::Apis::CesV1::ToolsetTool

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



4863
4864
4865
# File 'lib/google/apis/ces_v1/classes.rb', line 4863

def toolset
  @toolset
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4870
4871
4872
4873
4874
4875
4876
# File 'lib/google/apis/ces_v1/classes.rb', line 4870

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