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.
5434 5435 5436 |
# File 'lib/google/apis/ces_v1/classes.rb', line 5434 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
5410 5411 5412 |
# File 'lib/google/apis/ces_v1/classes.rb', line 5410 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
5416 5417 5418 |
# File 'lib/google/apis/ces_v1/classes.rb', line 5416 def mock_response @mock_response end |
#tool ⇒ String
Optional. Deprecated. Use tool_identifier instead.
Corresponds to the JSON property tool
5421 5422 5423 |
# File 'lib/google/apis/ces_v1/classes.rb', line 5421 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`
5427 5428 5429 |
# File 'lib/google/apis/ces_v1/classes.rb', line 5427 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
5432 5433 5434 |
# File 'lib/google/apis/ces_v1/classes.rb', line 5432 def toolset @toolset end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
5439 5440 5441 5442 5443 5444 5445 |
# File 'lib/google/apis/ces_v1/classes.rb', line 5439 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 |