SmartTool.ToolContext
Wisej.AI.SmartTool ToolContext
Last updated
Wisej.AI.SmartTool ToolContext
Last updated
Namespace: Wisej.AI
Assembly: Wisej.AI (3.5.0.0)
Represents the context in which a smart tool operates, providing properties and methods to manage tool execution.
The ToolContext
class encapsulates the state and behavior required to execute a smart tool, including its arguments, session, and endpoint.
Initializes a new instance of .
: Gets a value indicating whether the tool execution should be aborted.
: Gets the arguments for the tool execution.
Invokes the tool synchronously.
Invokes the tool asynchronously.
session
The session invoking the tool.
This method handles exceptions and manages the tool invocation lifecycle, including raising events before and after invocation.
: Gets the endpoint associated with the tool context.
: Gets the unique identifier for the tool context.
: Gets the current iteration count for the tool execution.
: Gets or sets the return value of the tool execution.
: Gets the session associated with the tool context.
: Gets the tool associated with the context.
Returns: . The result of the tool invocation.
Returns: . A task representing the asynchronous operation.