LogoLogo
HomeNewsSupportVideos
  • Welcome
  • Wisej.NET
  • Concepts
    • Getting Started
    • General Concepts
    • Architecture
    • Extensibility
    • AI Providers
    • Vector Databases
    • Usage Metrics
    • Logging & Error Handling
  • Markup
  • Components
    • API
      • SmartAdapter
        • SmartAudioTTSAdapter
        • SmartAudioWhisperAdapter
        • SmartCalendarAdapter
        • SmartChartAdapter
        • SmartChartJS3Adapter
        • SmartChatBoxAdapter
        • SmartComboBoxAdapter
        • SmartCopilotAdapter
        • SmartDataEntryAdapter
        • SmartDocumentAdapter
        • SmartFullCalendarAdapter
        • SmartObjectAdapter
        • SmartPictureBoxAdapter
        • SmartQueryAdapter
        • SmartRealtimeAdapter
        • SmartReportAdapter
        • SmartTextBoxAdapter
        • SmartAdapter.ExtendsAttribute
        • SmartAdapter.FieldNameAttribute
        • SmartAdapter.FieldPromptAttribute
        • SmartAdapter.FieldRectangleAttribute
        • SmartAdapter.WorksWithAttribute
      • SmartEndpoint
        • AmazonBedrockEndpoint
        • AnthropicEndpoint
        • AzureAIEndpoint
        • CerebrasEndpoint
        • DeepSeekEndpoint
        • GoogleAIEndpoint
        • GroqCloudEndpoint
        • GroqCloudEndpointWhisper
        • HuggingFaceEndpoint
        • HuggingFaceJavaScriptEndpoint
        • LocalAIEndpoint
        • LocalAIEndpointImageGen
        • LocalAIEndpointTTS
        • LocalAIEndpointWhisper
        • NvidiaAIEndpoint
        • OllamaEndpoint
        • OpenAIEndpoint
        • OpenAIEndpointDallE
        • OpenAIEndpointRealtime
        • OpenAIEndpointTTS
        • OpenAIEndpointWhisper
        • SambaNovaEndpoint
        • SmartHttpEndpoint
        • TogetherAIEndpoint
        • XAIEndpoint
        • SmartEndpoint.Metrics
        • SmartEndpoint.Response
      • SmartExtensions
      • SmartHub
        • SmartSession.ConvertParameterEventArgs
        • SmartSession.ConvertParameterEventHandler
        • SmartSession.ErrorEventArgs
        • SmartSession.ErrorEventHandler
        • SmartSession.InvokeToolEventArgs
        • SmartSession.InvokeToolEventHandler
        • SmartSession.MessagesEventArgs
        • SmartSession.MessagesEventHandler
      • SmartObject
      • SmartPrompt
        • SmartAgentPrompt
        • SmartParallelPrompt
        • SmartPrompt.Parameter
        • SmartSession.ConvertParameterEventArgs
        • SmartSession.ConvertParameterEventHandler
        • SmartSession.ErrorEventArgs
        • SmartSession.ErrorEventHandler
        • SmartSession.InvokeToolEventArgs
        • SmartSession.InvokeToolEventHandler
        • SmartSession.MessagesEventArgs
        • SmartSession.MessagesEventHandler
      • SmartRealtimeSession
      • SmartSession
        • SmartSession.ConvertParameterEventArgs
        • SmartSession.ConvertParameterEventHandler
        • SmartSession.ErrorEventArgs
        • SmartSession.ErrorEventHandler
        • SmartSession.InvokeToolEventArgs
        • SmartSession.InvokeToolEventHandler
        • SmartSession.Message
        • SmartSession.MessageCollection
        • SmartSession.MessageRole
        • SmartSession.MessagesEventArgs
        • SmartSession.MessagesEventHandler
        • SmartSession.TrimmingStrategy
      • SmartTool
        • SmartTool.IToolProvider
        • SmartTool.ToolAttribute
        • SmartTool.ToolContext
      • Markup
        • MarkupExtensions
      • Controls
        • UVLightOverlay
      • Embeddings
        • EmbeddedDocument
        • Embedding
        • Matches
        • Metadata
      • Helpers
        • ApiKeys
        • Markdown
        • TextTokenizer
      • Services
        • DefaultSessionTrimmingService
        • IDocumentConversionService
          • DefaultDocumentConversionService
        • IEmbeddingGenerationService
          • DefaultEmbeddingGenerationService
          • HuggingFaceEmbeddingGenerationService
        • IEmbeddingStorageService
          • AzureAISearchEmbeddingStorageService
          • ChromaEmbeddingStorageService
          • FileSystemEmbeddingStorageService
          • MemoryEmbeddingStorageService
          • PineconeEmbeddingStorageService
          • QdrantEmbeddingStorageService
        • IHttpClientService
          • DefaultHttpClientService
        • ILoggerService
          • DefaultLoggerService
        • IOCRService
          • DefaultOCRService
        • IRerankingService
          • DefaultRerankingService
          • LocalAIRerankingService
          • PineconeRerankingService
        • ISessionTrimmingService
          • DefaultSessionTrimmingService
        • ITextSplitterService
          • RecursiveCharacterTextSplitterService
          • TextSplitterServiceBase
        • ITokenizerService
          • DefaultTokenizerService
        • IWebSearchService
          • BingWebSearchService
          • BraveWebSearchService
          • GoogleWebSearchService
      • Tools
        • ArxivTools
        • ChartJS3Tools
        • DatabaseTools
        • DataTableFilterTools
        • DocumentSearchTools
        • DocumentTools
        • FullCalendarTools
        • IToolsContainer
        • MathTools
        • ToolsContainer
        • UtilityTools
        • WebSearchTools
    • Built-in Services
      • IOCRService
      • ILoggerService
      • ITextSplitterService
      • ITokenizerService
      • IHttpClientService
      • IWebSearchService
      • IRerankingService
      • ISessionTrimmingService
      • IDocumentConversionService
      • IEmbeddingStorageService
      • IEmbeddingGenerationService
    • Built-in SmartTools
      • ToolsContainer
      • MathTools
      • UtilityTools
      • DatabaseTools
      • DocumentTools
      • DocumentSearchTools
      • WebSearchTools
      • ChartJS3Tools
      • FullCalendarTools
    • Built-in SmartAdapters
      • SmartAdapter
      • SmartAudioTTSAdapter
      • SmartAudioWhisperAdapter
      • SmartCalendarAdapter
      • SmartChartAdapter
      • SmartChartJS3Adapter
      • SmartChatBoxAdapter
      • SmartComboBoxAdapter
      • SmartCopilotAdapter
      • SmartDataEntryAdapter
      • SmartDocumentAdapter
      • SmartFullCalendarAdapter
      • SmartObjectAdapter
      • SmartPictureBoxAdapter
      • SmartQueryAdapter
      • SmartRealtimeAdapter
      • SmartReportAdapter
      • SmartTextBoxAdapter
    • Configure Services
    • Using SmartHub
    • Using SmartTools
    • Using SmartPrompt
    • Using SmartSession
    • Using SmartRealTimeAdapter
    • UVLightOverlay Control
Powered by GitBook
On this page
  • Constructors
  • SmartAdapter()
  • SmartAdapter(container)
  • Properties
  • Agents
  • AutoRun
  • AutoUpdate
  • Busy
  • Controls
  • HasTools
  • Hub
  • Name
  • Parameters
  • Session
  • SystemPrompt
  • Tools
  • Usage
  • Methods
  • ClearTools()
  • CreateSession(prompt)
  • CreateSession<T>(systemPrompt)
  • Dispose(disposing)
  • GetJSON(message)
  • IsAssociatedWith(control)
  • NotifyAgentsAsync(message)
  • OnBusyChanged(e)
  • OnControlCreated(control)
  • OnControlDisposed(control)
  • OnDone(e)
  • OnStart(e)
  • RegisterControl(control)
  • RemoveTool(tool)
  • RemoveTools(target)
  • RunAsync(control)
  • UnregisterControl(control)
  • UseTool(tool)
  • UseTools(target)
  • Events
  • BusyChanged
  • Done
  • Start
  • Inherited By
  • Implements
Export as PDF
  1. Components
  2. API

SmartAdapter

Wisej.AI.SmartAdapter

PreviousAPINextSmartAudioTTSAdapter

Last updated 5 days ago

Namespace: Wisej.AI

Assembly: Wisej.AI (3.5.0.0)

Represents an abstract base class for creating smart adapters that interact with AI endpoints.

public class SmartAdapter : Component, IToolProvider
Public Class SmartAdapter
    Inherits Component
    Implements IToolProvider

Constructors

SmartAdapter()

Initializes a new instance of the class.

SmartAdapter(container)

Initializes a new instance of the class attached to an implementation to allow for disposing the SmartAdapter when the service container is disposed.

Name
Type
Description

container

Properties

Agents

: Gets the collection of agents associated with this adapter.

AutoRun

Methods

Clears all tools from the adapter.

Creates a new session with an optional prompt.

Parameter
Type
Description

The prompt to use for the session.

Creates a new session of a specified type with an optional prompt.

Parameter
Type
Description

T

The type of session to create.

The system prompt to use for the session.

Parameter
Type
Description

disposing

True to release both managed and unmanaged resources; false to release only unmanaged resources.

Returns the JSON string returned in the message by stripping the enclosing markers (json and ) if present.

Parameter
Type
Description

message

Message with the response text that may be a JSON string.

Determines whether a control is associated with the adapter.

Parameter
Type
Description

control

The control to check.

Notifies all agents asynchronously with a message.

Parameter
Type
Description

message

The message to notify agents with.

Parameter
Type
Description

e

Called when a control is created.

Parameter
Type
Description

control

The control that was created.

Called when a control is disposed.

Parameter
Type
Description

control

The control that was disposed.

Parameter
Type
Description

e

Parameter
Type
Description

e

Registers a control with the adapter.

Parameter
Type
Description

control

The control to register.

Removes a tool from the adapter.

Parameter
Type
Description

tool

The tool to remove.

Removes the tools from the specified object.

Parameter
Type
Description

target

The target object containing tools.

Runs the adapter asynchronously.

Parameter
Type
Description

The control to run the adapter on.

Unregisters a control from the adapter.

Parameter
Type
Description

control

The control to unregister.

Adds a tool to the adapter.

Parameter
Type
Description

tool

The tool to add.

Adds multiple tools to the adapter from a target object.

Parameter
Type
Description

target

The target object containing tools.

Events

Inherited By

Name
Description

Represents a smart calendar adapter that extends the functionality of a SmartAdapter.

Represents an adapter that enhances a chart control with AI features.

Represents an adapter that enhances a ChartJS control with several AI features.

Enhances all the controls in the associated container with the AI-powered capability to extract structured data from unstructured text.

Represents a document adapter that can perform AI tasks using a document as a data source and interact with the user through a ChatBox control.

Converts unstructured text into a structured .NET object.

Represents an adapter for a PictureBox that generates images based on a description using the OpenAI DALL-E endpoint.

Represents an adapter that generates a data set from a database schema and a user-provided description.

Enhances the ChatBox control to allow seamless PDF report queries using an AI provider.

Enhances a TextBox control with several AI features, including suggestions, translation, and auto-correction.

Implements

Name
Description

Represents a provider that supplies tools.

An that represents the container of the component.

: Gets or sets a value indicating whether the adapter should automatically run. (Default: True)

AutoUpdate

: Gets or sets a value indicating whether the adapter should automatically update the browser when is done processing (requires a working WebSocket connection). (Default: True)

Busy

: Gets or sets a value indicating whether the adapter is busy. (Default: False)

Controls

: Gets the list of controls associated with this adapter.

HasTools

: Gets a value indicating whether the adapter has any tools.

Hub

: Gets or sets the associated with this adapter.

Name

: Gets or sets the name of the adapter.

Parameters

: Gets the collection of parameters associated with this adapter.

Session

: Gets the in use by the adapter.

SystemPrompt

: Gets or sets the system prompt used by the adapter. (Default: "")

Tools

: Gets the collection of tools associated with this adapter.

Usage

: Gets the usage metrics for the session.

ClearTools()

CreateSession(prompt)

prompt

Returns: . A new instance.

CreateSession<T>(systemPrompt)

systemPrompt

Returns: . A new session of type T .

Dispose(disposing)

Releases the unmanaged resources used by the and optionally releases the managed resources.

GetJSON(message)

Returns: . JSON string.

IsAssociatedWith(control)

Returns: . True if the control is associated; otherwise, false.

NotifyAgentsAsync(message)

Returns: . A task representing the asynchronous operation.

OnBusyChanged(e)

Raises the event.

An that contains the event data.

OnControlCreated(control)

OnControlDisposed(control)

OnDone(e)

Raises the event.

An that contains the event data.

OnStart(e)

Raises the event.

An that contains the event data.

RegisterControl(control)

RemoveTool(tool)

Returns: .

RemoveTools(target)

Returns: . The current instance.

RunAsync(control)

control

Returns: . A task representing the asynchronous operation.

UnregisterControl(control)

UseTool(tool)

Returns: .

UseTools(target)

Returns: .

BusyChanged

Occurs when the busy state of the adapter changes.

Done

Occurs when the adapter has completed processing.

Start

Occurs when the adapter starts processing.

Converts the of the associated control into lifelike speech.

Transcribes the audio file of the of the associated control to its property in the original language of the audio.

Turns the control into a AI-powered bot. It can answer any question (depending on the AI model being used) and can invoke methods in your applications as needed (see ).

Adds semantic filtering to the auto-complete functionality.

Turns the control into a AI-powered assistant. It can control and navigate an application, click menu items, navigation bar items, buttons, etc. It can also invoke methods in your applications as needed (see ).

Represents a smart adapter that provides real-time data processing capabilities for use with the endpoint.

Boolean
Boolean
Boolean
IList<Control>
Boolean
SmartHub
SmartHub
String
ParameterCollection
SmartSession
SmartSession
String
ToolCollection
Metrics
SmartSession
SmartSession
T
SmartAdapter
String
Boolean
Task
SmartAdapter
SmartAdapter
SmartAdapter
Task<Message>
SmartAdapter
SmartAdapter
EventHandler
EventHandler
EventHandler
BusyChanged
Done
Start
IContainer
IContainer
SmartPrompt
SmartPrompt
Boolean
Message
Control
Message
EventArgs
EventArgs
Control
Control
EventArgs
EventArgs
EventArgs
EventArgs
Control
Delegate
Object
Control
Control
Delegate
Object
SmartAudioTTSAdapter
Text
Audio
SmartAudioWhisperAdapter
Audio
Text
speech-to-text
SmartCalendarAdapter
SmartChartAdapter
SmartChartJS3Adapter
SmartChatBoxAdapter
SmartComboBoxAdapter
ComboBox
SmartCopilotAdapter
SmartDataEntryAdapter
SmartDocumentAdapter
SmartFullCalendarAdapter
SmartObjectAdapter
SmartPictureBoxAdapter
SmartQueryAdapter
SmartRealtimeAdapter
OpenAIEndpointRealtime
SmartReportAdapter
SmartTextBoxAdapter
IToolProvider
SmartAdapter
SmartAdapter
IContainer
AgentCollection
SmartTool
SmartTool
ChatBox
ChatBox