SmartAgentPrompt
Namespace: Wisej.AI
Assembly: Wisej.AI
TODO:
- C#
- VB.NET
public class SmartAgentPrompt : SmartPrompt
Public Class SmartAgentPrompt
Inherits SmartPrompt
Constructors
SmartAgentPrompt(text)
Initializes a new instance of the SmartAgentPrompt class with optional text.
| Name | Type | Description |
|---|---|---|
| text | String | The text associated with the prompt. Default is null. |
Methods
RunAgentAsync(adapter, message)
Executes the agent request asynchronously with the specified sender and message.
| Parameter | Type | Description |
|---|---|---|
| adapter | SmartAdapter | The sender adapter initiating the request. |
| message | Message | Message to send to the agent for processing. |
Returns: Task<Message>. A task representing the asynchronous operation, with a Message as the result.
Throws:
- InvalidOperationException Thrown when the SmartAdapter is busy.
- ArgumentNullException Thrown when the sender is null.
Subscribe(adapter)
Subscribes the agent to the specified adapter.
| Parameter | Type | Description |
|---|---|---|
| adapter | SmartAdapter | The adapter to which the agent will be subscribed. |
Throws:
- ArgumentNullException Thrown when the adapter is null.
Unsubscribe(adapter)
Unsubscribes the agent from the specified adapter.
| Parameter | Type | Description |
|---|---|---|
| adapter | SmartAdapter | The adapter from which the agent will be unsubscribed. |
Throws:
- ArgumentNullException Thrown when the adapter is null.
Implements
| Name | Description |
|---|---|
| IToolProvider | Represents a provider that supplies tools. |