SmartObject
Namespace: Wisej.AI
Assembly: Wisej.AI
Provides common events and properties to SmartPrompt, SmartSession, and SmartHub objects.
- C#
- VB.NET
public class SmartObject : Component
Public Class SmartObject
Inherits Component
Properties
HasTools
Boolean: Gets a value indicating whether the session has tools.
Parameters
ParameterCollection: Gets the collection of parameters for the session.
Tools
ToolCollection: Gets the collection of tools available in the session.
Usage
Metrics: Gets the usage metrics for the session.
Methods
ClearTools()
Clears all tools from the smart prompt.
OnAfterInvokeTool(args)
Raises the AfterInvokeTool event.
| Parameter | Type | Description |
|---|---|---|
| args | InvokeToolEventArgs | The InvokeToolEventArgs instance containing the event data. |
OnAfterResponseReceived(args)
Raises the AfterResponseReceived event.
| Parameter | Type | Description |
|---|---|---|
| args | MessagesEventArgs | The MessagesEventArgs instance containing the event data. |
OnBeforeInvokeTool(args)
Raises the BeforeInvokeTool event.
| Parameter | Type | Description |
|---|---|---|
| args | InvokeToolEventArgs | The InvokeToolEventArgs instance containing the event data. |
OnBeforeSendRequest(args)
Raises the BeforeSendRequest event.
| Parameter | Type | Description |
|---|---|---|
| args | MessagesEventArgs | The MessagesEventArgs instance containing the event data. |
OnConvertParameter(args)
Raises the ConvertParameter event.
| Parameter | Type | Description |
|---|---|---|
| args | ConvertParameterEventArgs | The ConvertParameterEventArgs instance containing the event data. |
OnDone(e)
Raises the Done event.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | An EventArgs that contains the event data. |
OnError(args)
Raises the Error event.
| Parameter | Type | Description |
|---|---|---|
| args | ErrorEventArgs | The ErrorEventArgs instance containing the event data. |
OnPrepareMessages(e)
Raises the PrepareMessages event.
| Parameter | Type | Description |
|---|---|---|
| e | MessagesEventArgs | An MessagesEventArgs that contains the event data. |
OnStart(e)
Raises the Start event.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | An EventArgs that contains the event data. |
Events
AfterInvokeTool
InvokeToolEventHandler Occurs after a tool is invoked.
AfterResponseReceived
MessagesEventHandler Occurs after a response is received.
BeforeInvokeTool
InvokeToolEventHandler Occurs before a tool is invoked.
BeforeSendRequest
MessagesEventHandler Occurs before a request is sent.
ConvertParameter
ConvertParameterEventHandler Occurs when a parameter needs to be converted.
Done
EventHandler Occurs when the session is done processing a question.
Error
ErrorEventHandler Occurs when an error is encountered.
PrepareMessages
MessagesEventHandler Occurs after the messages have been prepared and before they are send to the AI.
Start
EventHandler Occurs when the session starts processing a question.
Inherited By
| Name | Description |
|---|---|
| SmartAgentPrompt | TODO: |
| SmartParallelPrompt | Represents a smart parallel prompt that can execute multiple tasks concurrently. |
| SmartHub | Represents a SmartHub component that provides AI capabilities to controls within a container. |
| SmartPrompt | Represents a smart prompt component that can process and manage prompts with tools and parameters. |
| SmartRealtimeSession | |
| SmartSession | Represents a session that manages interactions with a smart hub and endpoint, handling prompts, messages, and tools within the session context. |