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
  • SmartObjectAdapter()
  • SmartObjectAdapter(container)
  • Properties
  • MaxIterations
  • UseOCR
  • Methods
  • Dispose(disposing)
  • FromClipboardAsync<T>()
  • FromClipboardAsync(objectType)
  • FromImageAsync<T>(image)
  • FromImageAsync(image, objectType)
  • FromStreamAsync<T>(stream, streamType)
  • FromStreamAsync(stream, objectType, streamType)
  • FromTextAsync<T>(text)
  • FromTextAsync(text, objectType)
  • OnObjectParsed(args)
  • RunAsyncCore(control)
  • Events
  • ObjectParsed
  • Implements
Export as PDF
  1. Components
  2. API
  3. SmartAdapter

SmartObjectAdapter

Wisej.AI.Adapters.SmartObjectAdapter

PreviousSmartFullCalendarAdapterNextSmartPictureBoxAdapter

Last updated 5 days ago

Namespace: Wisej.AI.Adapters

Assembly: Wisej.AI (3.5.0.0)

Converts unstructured text into a structured .NET object.

public class SmartObjectAdapter : SmartAdapter
Public Class SmartObjectAdapter
    Inherits SmartAdapter

This class provides methods to convert text, images, streams, and clipboard content into .NET objects. It supports OCR for image processing and can handle multiple iterations to resolve missing values.

Constructors

SmartObjectAdapter()

Initializes a new instance of the class.

SmartObjectAdapter(container)

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

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.

Converts the clipboard content to an object of type T .

Parameter
Type
Description

T

The type of the object to return.

Converts the clipboard content to an object of the specified type.

Parameter
Type
Description

objectType

The type of the object to return.

Converts the specified image to an object of type T .

Parameter
Type
Description

T

The type of the object to return.

image

The image to convert.

Converts the specified image to an object of the specified type.

Parameter
Type
Description

image

The image to convert.

objectType

The type of the object to return.

Converts the specified stream to an object of type T .

Parameter
Type
Description

T

The type of the object to return.

stream

The stream to convert.

The type of the stream. Default is null.

Converts the specified stream to an object of the specified type.

Parameter
Type
Description

stream

The stream to convert.

objectType

The type of the object to return.

The type of the stream. Default is null.

Converts the specified text to an object of type T .

Parameter
Type
Description

T

The type of the object to return.

text

The text to convert.

Converts the specified text to an object of the specified type.

Parameter
Type
Description

text

The text to convert.

objectType

The type of the object to return.

Parameter
Type
Description

args

Executes the core logic of the adapter asynchronously.

Parameter
Type
Description

control

The control to use for the operation.

Events

Implements

Name
Description

Represents a provider that supplies tools.

An that represents the container of the component.

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<T>()

Returns: . A task that represents the asynchronous operation. The task result contains the converted object.

FromClipboardAsync(objectType)

Returns: . A task that represents the asynchronous operation. The task result contains the converted object.

FromImageAsync<T>(image)

Returns: . A task that represents the asynchronous operation. The task result contains the converted object.

FromImageAsync(image, objectType)

Returns: . A task that represents the asynchronous operation. The task result contains the converted object.

FromStreamAsync<T>(stream, streamType)

streamType

Returns: . A task that represents the asynchronous operation. The task result contains the converted object.

FromStreamAsync(stream, objectType, streamType)

streamType

Returns: . A task that represents the asynchronous operation. The task result contains the converted object.

FromTextAsync<T>(text)

Returns: . A task that represents the asynchronous operation. The task result contains the converted object.

FromTextAsync(text, objectType)

Returns: . A task that represents the asynchronous operation. The task result contains the converted object.

OnObjectParsed(args)

Raises the event.

The instance containing the event data.

RunAsyncCore(control)

Returns: . A task that represents the asynchronous operation. The task result contains the response message.

ObjectParsed

Occurs when an object is parsed.

Int32
Boolean
SmartObjectAdapter
Task<T>
Task<Object>
Task<T>
Task<Object>
Task<T>
Task<Object>
Task<T>
Task<Object>
Task<Message>
ObjectParsedEventHandler
ObjectParsed
IContainer
IContainer
Boolean
Type
Image
Image
Type
Stream
String
Stream
Type
String
String
String
Type
ObjectParsedEventArgs
ObjectParsedEventArgs
Control
IToolProvider
SmartAdapter
SmartObjectAdapter
SmartObjectAdapter
SmartObjectAdapter