execute
Executes the given prompt using the specified language model and returns the resulting text content.
Return
The textual response content from the executed prompt.
Parameters
prompt
The prompt to execute, containing the input messages, id, and execution parameters.
model
The language model to use for executing the prompt.
abstract suspend fun execute(prompt: Prompt, model: LLModel, tools: List<ToolDescriptor>): List<Message.Response>(source)
Executes a given prompt using the specified language model and tools, returning a list of responses from the model.
Return
A list of Message.Response
objects representing the responses generated by the language model.
Parameters
prompt
The Prompt
object containing the messages to be used in the execution.
model
The instance of LLModel
that specifies the language model to be used.
tools
A list of ToolDescriptor
objects that define the tools available for the execution.