Skip to main content

SmartComboBoxAdapter

Namespace: Wisej.AI.Adapters

Assembly: Wisej.AI

Adds semantic filtering to the ComboBox auto-complete functionality.

public class SmartComboBoxAdapter : SmartAdapter, IExtenderProvider

Works with the HuggingFaceJavaScriptEndpoint. Semantic filtering (items embedding) is entirely hosted on the user's browser and runs in JavaScript. Uses the HuggingFace TransformersJs library to run in-browser embeddings.

Constructors​

SmartComboBoxAdapter()​

Initializes a new instance of the SmartComboBoxAdapter class.

Properties​

AutoRun​

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

Model​

String: Gets or sets the embeddings model. See index for available models. The default is "Xenova/all-MiniLM-L6-v2". (Default: null)

Methods​

GetSimilarity(control)​

Gets the similarity level threshold needed for an item to qualify, ranging from 0.1 to 1.0 (1 means identical).

ParameterTypeDescription
controlControlThe control for which to get the similarity level.

Returns: Double. The minimum similarity level.

Throws:

OnControlCreated(control)​

Handles the event when a control is created.

ParameterTypeDescription
controlControlThe control that was created.

OnControlDisposed(control)​

Handles the event when a control is disposed.

ParameterTypeDescription
controlControlThe control that was disposed.

SetSimilarity(control, value)​

Sets the similarity level threshold for an item to qualify.

ParameterTypeDescription
controlControlThe control for which to set the similarity level.
valueDoubleThe similarity level, must be between 0 and 1.

Throws:

Implements​

NameDescription
IToolProviderRepresents a provider that supplies tools.