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
  • SmartParallelPrompt(text)
  • Methods
  • AskAsync(hub, inputs)
  • AskAsync(hub, inputs, images)
  • AskAsync(endpoint, inputs)
  • AskAsync(endpoint, inputs, images)
  • OnProgress(args)
  • Events
  • Progress
  • Implements
Export as PDF
  1. Components
  2. API
  3. SmartPrompt

SmartParallelPrompt

Wisej.AI.SmartParallelPrompt

PreviousSmartAgentPromptNextSmartPrompt.Parameter

Last updated 5 days ago

Namespace: Wisej.AI

Assembly: Wisej.AI (3.5.0.0)

Represents a smart parallel prompt that can execute multiple tasks concurrently.

public class SmartParallelPrompt : SmartPrompt
Public Class SmartParallelPrompt
    Inherits SmartPrompt

This class extends the class and provides functionality to run multiple prompts in parallel.

Constructors

SmartParallelPrompt(text)

Initializes a new instance of the class with optional text.

Name
Type
Description

text

The text associated with the prompt. Default is null.

Methods

AskAsync(hub, inputs)

Executes the prompt tasks asynchronously in parallel.

Parameter
Type
Description

hub

The smart hub used for executing the tasks.

inputs

An array of input prompts to process in parallel.


var smartPrompt = new SmartParallelPrompt();
var messages = await smartPrompt.RunAsync(hub, new string[] { "input1", "input2" });

Throws:

Executes the prompt tasks asynchronously in parallel.

Parameter
Type
Description

hub

The smart hub used for executing the tasks.

inputs

An array of input prompts to process in parallel.

images

An array of input images to process in parallel.


var smartPrompt = new SmartParallelPrompt();
var messages = await smartPrompt.RunAsync(hub, new string[] { "input1", "input2" });

Throws:

Executes the prompt tasks asynchronously in parallel.

Parameter
Type
Description

endpoint

The endpoint used for executing the tasks.

inputs

An array of input prompts to process in parallel.


var smartPrompt = new SmartParallelPrompt();
var messages = await smartPrompt.RunAsync(hub, new string[] { "input1", "input2" });

Throws:

Executes the prompt tasks asynchronously in parallel.

Parameter
Type
Description

endpoint

The endpoint used for executing the tasks.

inputs

An array of input prompts to process in parallel.

images

An array of input images to process in parallel.


var smartPrompt = new SmartParallelPrompt();
var messages = await smartPrompt.RunAsync(hub, new string[] { "input1", "input2" });

Throws:

Parameter
Type
Description

args

The event data.

Events

Implements

Name
Description

Represents a provider that supplies tools.

Returns: . A task that represents the asynchronous operation. The task result contains an array of objects.

This method runs each input through the method and tracks the progress using the property.

Thrown when hub is null.

Thrown when inputs is null.

AskAsync(hub, inputs, images)

Returns: . A task that represents the asynchronous operation. The task result contains an array of objects.

This method runs each input through the method and tracks the progress using the property.

Thrown when hub is null.

Thrown when inputs is null.

Thrown when images is null.

AskAsync(endpoint, inputs)

Returns: . A task that represents the asynchronous operation. The task result contains an array of objects.

This method runs each input through the method and tracks the progress using the property.

Thrown when inputs is null.

AskAsync(endpoint, inputs, images)

Returns: . A task that represents the asynchronous operation. The task result contains an array of objects.

This method runs each input through the method and tracks the progress using the property.

Thrown when inputs is null.

OnProgress(args)

Raises the event.

Progress

Occurs when progress is made in the execution of the parallel tasks.

Task<Message[]>
Message
ArgumentNullException
ArgumentNullException
Task<Message[]>
Message
ArgumentNullException
ArgumentNullException
ArgumentNullException
Task<Message[]>
Message
ArgumentNullException
Task<Message[]>
Message
ArgumentNullException
ProgressEventHandler
Progress
String
SmartHub
String[]
SmartHub
String[]
Image[]
SmartEndpoint
String[]
SmartEndpoint
String[]
Image[]
ProgressEventArgs
IToolProvider
SmartObject
SmartPrompt
SmartParallelPrompt
SmartPrompt
SmartParallelPrompt
CurrentIndex
CurrentIndex
CurrentIndex
CurrentIndex
AskAsync
AskAsync
AskAsync
AskAsync