All pages
Powered by GitBook
1 of 1

Loading...

SmartComboBoxAdapter

Wisej.AI.Adapters.SmartComboBoxAdapter

Namespace: Wisej.AI.Adapters

Assembly: Wisej.AI (3.5.0.0)

  • SmartAdapter

    • SmartComboBoxAdapter

Adds semantic filtering to the ComboBox auto-complete functionality.

public class SmartComboBoxAdapter : SmartAdapter, IExtenderProvider

Works with the . 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 class.

Properties

AutoRun

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

Model

: Gets or sets the embeddings model. See 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

Returns: . The minimum similarity level.

Throws:

  • Thrown when the control is null.

OnControlCreated(control)

Handles the event when a control is created.

Parameter
Type
Description

OnControlDisposed(control)

Handles the event when a control is disposed.

Parameter
Type
Description

SetSimilarity(control, value)

Sets the similarity level threshold for an item to qualify.

Parameter
Type
Description

Throws:

  • Thrown when the control is null.

  • Thrown when the value is not between 0 and 1.

Implements

Name
Description

control

Control

The control for which to get the similarity level.

control

Control

The control that was created.

control

Control

The control that was disposed.

control

Control

The control for which to set the similarity level.

value

Double

The similarity level, must be between 0 and 1.

IToolProvider

Represents a provider that supplies tools.

Public Class SmartComboBoxAdapter
    Inherits SmartAdapter
    Implements IExtenderProvider
HuggingFaceJavaScriptEndpoint
SmartComboBoxAdapter
Boolean
String
index
Double
ArgumentNullException
ArgumentNullException
ArgumentException