SingleLLMPromptExecutor

open class SingleLLMPromptExecutor(llmClient: LLMClient) : PromptExecutor(source)

Executes prompts using a direct client for communication with large language model (LLM) providers.

This class provides functionality to execute prompts with optional tools and retrieve either a list of responses or a streaming flow of response chunks from the LLM provider. It delegates the actual LLM interaction to the provided implementation of LLMClient.

Parameters

llmClient

The client used for direct communication with the LLM provider.

Constructors

Link copied to clipboard
constructor(llmClient: LLMClient)

Creates an instance of LLMPromptExecutor.

Functions

Link copied to clipboard
open suspend override fun execute(prompt: Prompt, model: LLModel, tools: List<ToolDescriptor>): List<Message.Response>
open suspend fun execute(prompt: Prompt, model: LLModel): String
Link copied to clipboard
open suspend override fun executeStreaming(prompt: Prompt, model: LLModel): Flow<String>