SmartTool.ToolContext
Wisej.AI.SmartTool ToolContext
Last updated
Wisej.AI.SmartTool ToolContext
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.
public class ToolContextPublic Class ToolContextThe ToolContext class encapsulates the state and behavior required to execute a smart tool, including its arguments, session, and endpoint.
Initializes a new instance of ToolContext.
Boolean: Gets a value indicating whether the tool execution should be aborted.
Dictionary<String, Object>: Gets the arguments for the tool execution.
SmartEndpoint: Gets the endpoint associated with the tool context.
String: Gets the unique identifier for the tool context.
Int32: Gets the current iteration count for the tool execution.
Object: Gets or sets the return value of the tool execution.
SmartSession: Gets the session associated with the tool context.
SmartTool: Gets the tool associated with the context.
Invokes the tool synchronously.
Returns: Object. The result of the tool invocation.
Invokes the tool asynchronously.
Returns: Task. A task representing the asynchronous operation.
This method handles exceptions and manages the tool invocation lifecycle, including raising events before and after invocation.
Last updated
