aiChatAsync
Syntax
aiChatAsync(messages, params, options)Parameters
Parameter
Type
Required
Description
Returns
Examples
Basic Async Request
// Start async request
future = aiChatAsync( "What is BoxLang?" );
// Do other work...
doSomethingElse();
// Get result (blocks until ready)
response = future.get();
println( response );Multiple Concurrent Requests
With Callback
Error Handling
With Timeout
Parallel Processing Pipeline
Background Processing
Future Methods
.get(timeout)
.get(timeout).then(callback)
.then(callback).onError(callback)
.onError(callback).isDone()
.isDone().cancel()
.cancel()Use Cases
✅ Multiple Independent Requests
✅ Long-Running Operations
✅ Background Tasks
❌ Simple Single Request
Notes
Related Functions
Performance Tips
Last updated