Class: Google::Cloud::Ces::V1::CodeBlock
- Inherits:
-
Object
- Object
- Google::Cloud::Ces::V1::CodeBlock
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/ces/v1/fakes.rb
Overview
A code block to be executed instead of a real tool call.
Instance Attribute Summary collapse
-
#python_code ⇒ ::String
Required.
Instance Attribute Details
#python_code ⇒ ::String
Returns Required. Python code which will be invoked in tool fake mode. Expected Python function signature - To catch all tool calls: def fake_tool_call(tool: Tool, input: dict[str, Any], callback_context: CallbackContext) -> Optional[dict[str, Any]]: To catch a specific tool call: def fake_{tool_id}(tool: Tool, input: dict[str, Any], callback_context: CallbackContext) -> Optional[dict[str, Any]]: If the function returns None, the real tool will be invoked instead.
36 37 38 39 |
# File 'proto_docs/google/cloud/ces/v1/fakes.rb', line 36 class CodeBlock include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end |