execute

abstract suspend fun execute(prompt: Prompt, model: LLModel, tools: List<ToolDescriptor> = emptyList()): Message.Assistant(source)

Executes a given prompt using the specified LLM and tools, returning a list of responses from the model.

Return

A list of Message.Response objects representing the responses generated by the LLM.

Parameters

prompt

The Prompt object containing the messages to be used in the execution.

model

The instance of LLModel that specifies the LLM to be used.

tools

An optional list of ToolDescriptor objects that define the tools available for the execution.


open suspend fun execute(prompt: Prompt, model: ResolvedModel, tools: List<ToolDescriptor> = emptyList()): Message.Assistant(source)

Executes a given prompt against an already-resolved model and returns the assistant response.

Return

A Message.Assistant containing the response generated by the LLM.

Parameters

prompt

The Prompt containing the messages to be used in the execution.

model

The ResolvedModel returned by resolveModel.

tools

An optional list of ToolDescriptor objects available during the execution.