public sealed class CodeBlock : IMessage<CodeBlock>, IEquatable<CodeBlock>, IDeepCloneable<CodeBlock>, IBufferMessage, IMessageReference documentation and code samples for the Gemini Enterprise for Customer Experience v1 API class CodeBlock.
A code block to be executed instead of a real tool call.
Implements
IMessageCodeBlock, IEquatableCodeBlock, IDeepCloneableCodeBlock, IBufferMessage, IMessageNamespace
Google.Cloud.Ces.V1Assembly
Google.Cloud.Ces.V1.dll
Constructors
CodeBlock()
public CodeBlock()CodeBlock(CodeBlock)
public CodeBlock(CodeBlock other)| Parameter | |
|---|---|
| Name | Description |
other |
CodeBlock |
Properties
PythonCode
public string PythonCode { get; set; }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.
| Property Value | |
|---|---|
| Type | Description |
string |
|