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
  • SmartDataEntryAdapter()
  • SmartDataEntryAdapter(container)
  • Properties
  • ExcludeReadOnly
  • MaxIterations
  • UseOCR
  • Methods
  • Dispose(disposing)
  • FromClipboardAsync()
  • FromImageAsync(image)
  • FromStreamAsync(stream, streamType)
  • FromTextAsync(text)
  • GetFieldName(component)
  • GetFieldPrompt(component)
  • GetFieldRectangle(component)
  • OnParseValue(e)
  • OnUpdateField(e)
  • RunAsyncCore(control)
  • SetFieldName(component, value)
  • SetFieldPrompt(component, value)
  • SetFieldRectangle(component, value)
  • Events
  • ParseValue
  • UpdateField
  • Implements
Export as PDF
  1. Components
  2. API
  3. SmartAdapter

SmartDataEntryAdapter

Wisej.AI.Adapters.SmartDataEntryAdapter

PreviousSmartCopilotAdapterNextSmartDocumentAdapter

Last updated 5 days ago

Namespace: Wisej.AI.Adapters

Assembly: Wisej.AI (3.5.0.0)

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

public class SmartDataEntryAdapter : SmartAdapter, IExtenderProvider
Public Class SmartDataEntryAdapter
    Inherits SmartAdapter
    Implements IExtenderProvider

Works with:

  • AzureAI/OpenAI gpt-4

  • AzureAI/OpenAI gpt-4o

  • AzureAI/OpenAI gpt-3.5

  • AzureAI/Anthropic Claude

  • Google Gemini

  • Llama3:8b and 70b

Supports several types of sources for the input text: Clipboard (text or image), PDF stream, Text, Word, Excel. Uses the extension to run the OCR text extraction on the user's browser in JavaScript.

Constructors

SmartDataEntryAdapter()

Name
Type
Description

container

Properties

If the adapter was not provided any tool, this property is ignored since it will not try to resolve missing values.

Methods

Parameter
Type
Description

disposing

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

Asynchronously processes data from the clipboard and extracts structured data.

Throws:

Asynchronously processes the provided image and extracts structured data.

Parameter
Type
Description

image

The image to be processed.

Throws:

Asynchronously processes the provided stream and extracts text and image data. If an image is detected without associated text, the method attempts to perform OCR to extract text.

Parameter
Type
Description

stream

The stream containing the input data.

An optional string that specifies the type of data being processed. If not provided, a default value is used.

Throws:

Asynchronously processes the provided text and extracts structured data.

Parameter
Type
Description

text

The text to be processed.

Throws:

Gets the name of the field to extract for the specified component.

Parameter
Type
Description

component

The component for which to get the field name.

Throws:

Parameter
Type
Description

component

Gets the rectangle that defines the area of the field to extract for the specified component.

Parameter
Type
Description

component

The component for which to get the field rectangle.

Throws:

Parameter
Type
Description

e

Parameter
Type
Description

e

Asynchronously runs the core logic of the adapter on the specified control.

Parameter
Type
Description

control

The control to process.

Sets the name of the field to extract for the specified component.

Parameter
Type
Description

component

The component for which to set the field name.

value

The name of the field to extract.

Throws:

Sets the prompt to instruct the AI on how to extract the value for the field for the specified component.

Parameter
Type
Description

component

The component for which to set the field prompt.

value

The prompt to instruct the AI on how to extract the value for the field.

Throws:

Sets the rectangle that defines the area of the field to extract for the specified component.

Parameter
Type
Description

component

The component for which to set the field rectangle.

value

The rectangle that defines the area of the field to extract.

Throws:

Events

Implements

Name
Description

Represents a provider that supplies tools.

Initializes a new instance of the class.

SmartDataEntryAdapter(container)

Initializes a new instance of the class with the specified container.

An that represents the container of the component.

ExcludeReadOnly

: Gets or sets a value indicating whether read-only controls should be excluded. (Default: False)

MaxIterations

: Gets or sets the maximum number of times the adapter will try to use the available tools to complete the missing values. (Default: 2)

UseOCR

: Gets or sets a value indicating whether OCR should be used for image processing. (Default: False)

Dispose(disposing)

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

FromClipboardAsync()

Returns: . A task representing the asynchronous operation.

Thrown when the SmartAdapter is busy.

FromImageAsync(image)

Returns: . A task representing the asynchronous operation.

Thrown when the image is null.

Thrown when the SmartAdapter is busy.

FromStreamAsync(stream, streamType)

streamType

Returns: . A task representing the asynchronous operation.

Thrown when the stream is null.

Thrown when the SmartAdapter is busy.

FromTextAsync(text)

Returns: . A task representing the asynchronous operation.

Thrown when the text is null.

Thrown when the SmartAdapter is busy.

GetFieldName(component)

Returns: . The name of the field to extract.

Thrown when the component is null.

GetFieldPrompt(component)

Returns: .

GetFieldRectangle(component)

Returns: . The rectangle that defines the area of the field to extract.

Thrown when the component is null.

OnParseValue(e)

Raises the event.

The instance containing the event data.

OnUpdateField(e)

Raises the event.

The instance containing the event data.

RunAsyncCore(control)

Returns: . A task representing the asynchronous operation.

SetFieldName(component, value)

Thrown when the component is null.

SetFieldPrompt(component, value)

Thrown when the component is null.

SetFieldRectangle(component, value)

Thrown when the component is null.

ParseValue

Occurs when a value is parsed from the input data.

UpdateField

Occurs when a field is updated with a new value.

SmartDataEntryAdapter
SmartDataEntryAdapter
Boolean
Int32
Boolean
SmartDataEntryAdapter
Task
InvalidOperationException
Task
ArgumentNullException
InvalidOperationException
Task
ArgumentNullException
InvalidOperationException
Task
ArgumentNullException
InvalidOperationException
String
ArgumentNullException
String
Nullable<Rectangle>
ArgumentNullException
Task<Message>
ArgumentNullException
ArgumentNullException
ArgumentNullException
ParseValueEventHandler
UpdateFieldEventHandler
ParseValue
UpdateField
IContainer
IContainer
Boolean
Image
Stream
String
String
IWisejComponent
IWisejComponent
IWisejComponent
ParseValueArgs
ParseValueArgs
UpdateFieldArgs
UpdateFieldArgs
Control
IWisejComponent
String
IWisejComponent
String
IWisejComponent
Nullable<Rectangle>
IToolProvider
SmartAdapter
SmartDataEntryAdapter
Tesseract