MultiLLMPromptExecutor
open class MultiLLMPromptExecutor(llmClients: Map<LLMProvider, LLMClient>, fallback: MultiLLMPromptExecutor.FallbackPromptExecutorSettings? = null) : PromptExecutor(source)
MultiLLMPromptExecutor is a class responsible for executing prompts across multiple Large Language Models (LLMs). This implementation supports direct execution with specific LLM clients or utilizes a fallback strategy if no primary LLM client is available for the requested provider.
Parameters
llmClients
A map containing LLM providers associated with their respective LLMClients.
fallback
Optional settings to configure the fallback mechanism in case a specific provider is not directly available.
Constructors
Link copied to clipboard
Initializes a new instance of the MultiLLMPromptExecutor
class with multiple LLM clients.
constructor(llmClients: Map<LLMProvider, LLMClient>, fallback: MultiLLMPromptExecutor.FallbackPromptExecutorSettings? = null)
Constructs an executor instance with a map of LLM providers associated with their respective clients.
Types
Link copied to clipboard
data class FallbackPromptExecutorSettings(val fallbackProvider: LLMProvider, val fallbackModel: LLModel)
Represents configuration for a fallback large language model (LLM) execution strategy.