MultiLLMPromptExecutor
Constructs an executor instance with a map of LLM providers associated with their respective clients.
Parameters
A map containing LLM providers associated with their respective LLMClients.
Optional settings to configure the fallback mechanism in case a specific provider is not directly available.
This class remains open for source and binary compatibility with existing subclasses. For new custom prompt executors, prefer extending ai.koog.prompt.executor.model.DynamicPromptExecutor. If you subclass this class, prefer overriding the ResolvedModel-based overloads. Override the LLModel-based overloads only when you intentionally take over the full model-resolution and execution flow.
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
Variable number of pairs, where each pair consists of an LLMProvider representing the provider and a LLMClient for communication with that provider.
Secondary constructor for MultiLLMPromptExecutor that accepts a list of LLMClient instances. The provided clients are processed to create a mapping of LLMProvider to their respective LLMClient.
Parameters
Vararg parameter of LLMClient instances used to construct the executor.
Secondary constructor for MultiLLMPromptExecutor that accepts a variable number of LLMClient instances. The provided clients are processed to create a mapping of LLMProvider to their respective LLMClient.
Parameters
Vararg parameter of LLMClient instances used to construct the executor.