Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: cleanup display of free endpoint #1860

Merged
merged 2 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading