SmartComboBoxAdapter

Wisej.AI.Adapters.SmartComboBoxAdapter

Namespace: Wisej.AI.Adapters

Assembly: Wisej.AI (3.5.0.0)

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).

Parameter
Type
Description

control

The 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.

Parameter
Type
Description

control

The control that was created.

OnControlDisposed(control)

Handles the event when a control is disposed.

Parameter
Type
Description

control

The control that was disposed.

SetSimilarity(control, value)

Sets the similarity level threshold for an item to qualify.

Parameter
Type
Description

control

The control for which to set the similarity level.

value

The similarity level, must be between 0 and 1.

Throws:

Implements

Name
Description

Represents a provider that supplies tools.

Last updated