Form

AI Input and Output Controls

GPALInput and GPALTextArea can feed GPAL.Ai as live input sources; GPALTextArea and GPALRichTextBox receive AI output; GPALStatusStrip shows AI status - wiring all three turns a form into a live AI interface.

GPALInput and GPALTextArea can feed GPAL.Ai as live input sources; GPALTextArea and GPALRichTextBox receive AI output; GPALStatusStrip shows AI status - wiring all three turns a form into a live AI interface.

GPALInput and GPALTextArea are accepted by GPAL.Ai.WithLiveInputFrom, which wires a debounced callback so the AI pipeline reruns automatically whenever the control value changes. GPALTextArea and GPALRichTextBox are accepted by GPAL.Ai.WithOutputTo, writing AI responses directly into the control as they arrive. GPALStatusStrip is accepted by GPAL.Ai.WithStatusTo, displaying working/done status messages during the AI call. These controls need no special configuration on the form side - passing the control reference into the GPAL.Ai chain is all that is required.

TIP

GPALRichTextBox is not listed among the standard form controls in this reference because it is an output-only target - it does not appear in the form layout builder but is available as a WithOutputTo target when richer text display is needed.

Examples

GPAL Fluent: High-level fluent C# API

//The form controls (inputControl, outputTextArea, statusStrip) are GPALForm control instances declared in the same form class. WithLiveInputFrom wires the debounce timer to inputControl so the chain re-executes automatically on user input. WithOutputTo writes the result into outputTextArea. WithStatusTo updates statusStrip with working/done messages.

// Wire a form as a live AI interface // inputControl feeds the AI; outputArea receives the response // statusStrip shows when the AI is working GPAL.Ai .WithCredentials(GPAL.CredentialsFor(CredentialServiceType.StaticKey) .WithStaticKey("sk-...") .ToGPALObject()) .WithProvider(AIProviderType.OpenAI) .WithTask(AITask.Summarization) .WithLiveInputFrom(inputControl, debounceMilliseconds: 800) .WithOutputTo(outputTextArea) .WithStatusTo(statusStrip) .Execute();