executeSingle

fun executeSingle(prompt: ERROR CLASS: Symbol not found for Prompt, tools: List<ERROR CLASS: Symbol not found for ToolDescriptor>, executorService: ExecutorService? = null): ERROR CLASS: Symbol not found for Message.Response(source)

Executes a single task or request associated with the given Prompt and ToolDescriptor list.

This method processes the provided tools based on the given prompt, utilizing an optional ExecutorService for managing execution context or concurrency.

Return

a Message.Response object representing the result of the executed task

Parameters

prompt

the prompt to be used for the task execution

tools

the list of tools to be executed in conjunction with the prompt

executorService

an optional executor service for managing the execution context; if null, the default dispatcher is used