Check LLM API connection before doing anything else. (#949)

This commit is contained in:
Goran Peretin
2024-05-25 19:01:39 +02:00
committed by GitHub
parent 886c6a910a
commit 9109a8ae7f
6 changed files with 108 additions and 126 deletions

View File

@@ -299,6 +299,13 @@ class Config(_StrictModel):
provider_config = self.llm[agent_config.provider]
return LLMConfig.from_provider_and_agent_configs(provider_config, agent_config)
def all_llms(self) -> list[LLMConfig]:
"""
Get configuration for all defined LLMs.
"""
return [self.llm_for_agent(agent) for agent in self.agent]
class ConfigLoader:
"""