executeAsync

fun executeAsync(prompt: Prompt, model: LLModel, tools: List<ToolDescriptor> = emptyList(), coroutineContext: CoroutineContext = Dispatchers.IO): CompletableFuture<List<Message.Response>>(source)

Executes the given prompt asynchronously using the specified model and tools.

Return

A CompletableFuture containing a list of response messages produced by the execution.

Parameters

prompt

The prompt input to be executed.

model

The language model to process the prompt.

tools

An optional list of tool descriptors that may assist in processing the prompt.

coroutineContext

The coroutine context to execute the operation, defaulting to Dispatchers.IO.