SmartObject

Wisej.AI.SmartObject

Namespace: Wisej.AI

Assembly: Wisej.AI (3.5.0.0)

Provides common events and properties to SmartPrompt, SmartSession, and SmartHub objects.

public class SmartObject : 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

The InvokeToolEventArgs instance containing the event data.

OnAfterResponseReceived(args)

Raises the AfterResponseReceived event.

Parameter
Type
Description

args

The MessagesEventArgs instance containing the event data.

OnBeforeInvokeTool(args)

Raises the BeforeInvokeTool event.

Parameter
Type
Description

args

The InvokeToolEventArgs instance containing the event data.

OnBeforeSendRequest(args)

Raises the BeforeSendRequest event.

Parameter
Type
Description

args

The MessagesEventArgs instance containing the event data.

OnConvertParameter(args)

Raises the ConvertParameter event.

Parameter
Type
Description

args

The ConvertParameterEventArgs instance containing the event data.

OnDone(e)

Raises the Done event.

Parameter
Type
Description

e

An EventArgs that contains the event data.

OnError(args)

Raises the Error event.

Parameter
Type
Description

args

The ErrorEventArgs instance containing the event data.

OnPrepareMessages(e)

Raises the PrepareMessages event.

Parameter
Type
Description

e

An MessagesEventArgs that contains the event data.

OnStart(e)

Raises the Start event.

Parameter
Type
Description

e

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

Represents a smart parallel prompt that can execute multiple tasks concurrently.

Represents a SmartHub component that provides AI capabilities to controls within a container.

Represents a smart prompt component that can process and manage prompts with tools and parameters.

Represents a session that manages interactions with a smart hub and endpoint, handling prompts, messages, and tools within the session context.

Last updated