Gemini Enterprise for Customer Experience v1 API - Class CodeBlock (1.0.0-beta01)

public sealed class CodeBlock : IMessage<CodeBlock>, IEquatable<CodeBlock>, IDeepCloneable<CodeBlock>, IBufferMessage, IMessage

Reference 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.

Inheritance

object > CodeBlock

Namespace

Google.Cloud.Ces.V1

Assembly

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