Skip to content

Commit

Permalink
merged main
Browse files Browse the repository at this point in the history
  • Loading branch information
Mindy Long committed Dec 12, 2024
2 parents 328e97d + c4d227c commit faa515e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions letta/server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -1809,14 +1809,20 @@ def list_llm_models(self) -> List[LLMConfig]:

llm_models = []
for provider in self._enabled_providers:
llm_models.extend(provider.list_llm_models())
try:
llm_models.extend(provider.list_llm_models())
except Exception as e:
warnings.warn(f"An error occurred while listing LLM models for provider {provider}: {e}")
return llm_models

def list_embedding_models(self) -> List[EmbeddingConfig]:
"""List available embedding models"""
embedding_models = []
for provider in self._enabled_providers:
embedding_models.extend(provider.list_embedding_models())
try:
embedding_models.extend(provider.list_embedding_models())
except Exception as e:
warnings.warn(f"An error occurred while listing embedding models for provider {provider}: {e}")
return embedding_models

def add_llm_model(self, request: LLMConfig) -> LLMConfig:
Expand Down

0 comments on commit faa515e

Please sign in to comment.