MultiLLMPromptExecutor

constructor(vararg llmClients: Pair<LLMProvider, LLMClient>)(source)

Initializes a new instance of the MultiLLMPromptExecutor class with multiple LLM clients.

Allows specifying a variable number of client-provider pairs, where each pair links a specific LLMProvider with a corresponding implementation of LLMClient. All provided pairs are internally converted into a map for efficient access and management of clients by their associated providers.

Parameters

llmClients

Variable number of pairs, where each pair consists of an LLMProvider representing the provider and a LLMClient for communication with that provider.


constructor(llmClients: Map<LLMProvider, LLMClient>, fallback: MultiLLMPromptExecutor.FallbackPromptExecutorSettings? = null)(source)

Constructs an executor instance with a map of LLM providers associated with their respective clients.

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.