feat: Port letta free embeddings to openai proxy (#3695)

This commit is contained in:
Matthew Zhou
2025-08-01 12:19:37 -07:00
committed by GitHub
parent f1c936a59d
commit b5ba22a08e
4 changed files with 6 additions and 4 deletions

View File

@@ -233,7 +233,9 @@ def embedding_model(config: EmbeddingConfig, user_id: Optional[uuid.UUID] = None
if endpoint_type == "openai":
return OpenAIEmbeddings(
api_key=model_settings.openai_api_key, model=config.embedding_model, base_url=model_settings.openai_api_base
api_key=model_settings.openai_api_key,
model=config.embedding_model,
base_url=config.embedding_endpoint or model_settings.openai_api_base,
)
elif endpoint_type == "azure":

View File

@@ -77,7 +77,7 @@ class EmbeddingConfig(BaseModel):
)
elif model_name == "letta":
return cls(
embedding_endpoint="https://embeddings.memgpt.ai",
embedding_endpoint="https://bun-function-production-e310.up.railway.app/v1",
embedding_model="BAAI/bge-large-en-v1.5",
embedding_dim=1024,
embedding_chunk_size=DEFAULT_EMBEDDING_CHUNK_SIZE,

View File

@@ -31,7 +31,7 @@ class LettaProvider(Provider):
EmbeddingConfig(
embedding_model="letta-free", # NOTE: renamed
embedding_endpoint_type="hugging-face",
embedding_endpoint="https://embeddings.memgpt.ai",
embedding_endpoint="https://bun-function-production-e310.up.railway.app/v1",
embedding_dim=1024,
embedding_chunk_size=DEFAULT_EMBEDDING_CHUNK_SIZE,
handle=self.get_handle("letta-free", is_embedding=True),

View File

@@ -149,7 +149,7 @@ def create_test_agent(name, actor, test_id: Optional[str] = None, model="anthrop
dummy_embedding_config = EmbeddingConfig(
embedding_model="letta-free",
embedding_endpoint_type="hugging-face",
embedding_endpoint="https://embeddings.memgpt.ai",
embedding_endpoint="https://bun-function-production-e310.up.railway.app/v1",
embedding_dim=1024,
embedding_chunk_size=300,
handle="letta/letta-free",