Skip to content

Commit

Permalink
feat: cleanup display of free endpoint (#1860)
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahwooders authored Oct 10, 2024
1 parent e3c22f1 commit dba25c3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions letta/embeddings.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ def __init__(
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
Expand Down
1 change: 1 addition & 0 deletions letta/llm_api/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions letta/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -41,7 +41,7 @@ def list_llm_models(self) -> List[LLMConfig]:
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,
Expand Down

0 comments on commit dba25c3

Please sign in to comment.