Configuration for tool behavior in fake mode.
| JSON representation |
|---|
{ "enableFakeMode": boolean, // Union field |
| Fields | |
|---|---|
enableFakeMode |
Optional. Whether the tool is using fake mode. |
Union field tool_response. The response is either static or it is provided by a python function. tool_response can be only one of the following: |
|
codeBlock |
Optional. Code block which will be executed instead of a real tool call. |
CodeBlock
A code block to be executed instead of a real tool call.
| JSON representation |
|---|
{ "pythonCode": string } |
| Fields | |
|---|---|
pythonCode |
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_{toolId}(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. |