Class: Google::Apis::CesV1::MockedToolCall
- Inherits:
-
Object
- Object
- Google::Apis::CesV1::MockedToolCall
- 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
-
#expected_args_pattern ⇒ Hash<String,Object>
Required.
-
#mock_response ⇒ Hash<String,Object>
Optional.
-
#tool ⇒ String
Optional.
-
#tool_id ⇒ String
Optional.
-
#toolset ⇒ Google::Apis::CesV1::ToolsetTool
A tool that is created from a toolset.
Instance Method Summary collapse
-
#initialize(**args) ⇒ MockedToolCall
constructor
A new instance of MockedToolCall.
-
#update!(**args) ⇒ Object
Update properties of this object.
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_pattern ⇒ Hash<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
4674 4675 4676 |
# File 'lib/google/apis/ces_v1/classes.rb', line 4674 def expected_args_pattern @expected_args_pattern end |
#mock_response ⇒ Hash<String,Object>
Optional. The mock response / output to return if the tool call args / inputs
match the pattern.
Corresponds to the JSON property mockResponse
4680 4681 4682 |
# File 'lib/google/apis/ces_v1/classes.rb', line 4680 def mock_response @mock_response end |
#tool ⇒ String
Optional. Deprecated. Use tool_identifier instead.
Corresponds to the JSON property tool
4685 4686 4687 |
# File 'lib/google/apis/ces_v1/classes.rb', line 4685 def tool @tool end |
#tool_id ⇒ String
Optional. The name of the tool to mock. Format: projects/project/locations/
location/apps/app/tools/tool`
Corresponds to the JSON propertytoolId`
4691 4692 4693 |
# File 'lib/google/apis/ces_v1/classes.rb', line 4691 def tool_id @tool_id end |
#toolset ⇒ Google::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 |