feat: cleanup display of free endpoint (#1860)

This commit is contained in:
Sarah Wooders 2024-10-09 17:47:20 -07:00 committed by GitHub
parent e3c22f139d
commit dba25c3c12
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 2 deletions

View File

@ -91,6 +91,9 @@ class EmbeddingEndpoint:
raise ValueError(
f"Embeddings endpoint was provided an invalid URL (set to: '{base_url}'). Make sure embedding_endpoint is set correctly in your Letta config."
)
# TODO: find a neater solution - re-mapping for letta endpoint
if model == "letta-free":
model = "BAAI/bge-large-en-v1.5"
self.model_name = model
self._user = user
self._base_url = base_url

View File

@ -145,6 +145,7 @@ def build_openai_chat_completions_request(
import uuid
data.user = str(uuid.UUID(int=0))
data.model = "memgpt-openai"
return data

View File

@ -31,7 +31,7 @@ class LettaProvider(Provider):
def list_llm_models(self) -> List[LLMConfig]:
return [
LLMConfig(
model="memgpt-openai",
model="letta-free", # NOTE: renamed
model_endpoint_type="openai",
model_endpoint="https://inference.memgpt.ai",
context_window=16384,
@ -41,7 +41,7 @@ class LettaProvider(Provider):
def list_embedding_models(self):
return [
EmbeddingConfig(
embedding_model="BAAI/bge-large-en-v1.5",
embedding_model="letta-free", # NOTE: renamed
embedding_endpoint_type="hugging-face",
embedding_endpoint="https://embeddings.memgpt.ai",
embedding_dim=1024,