From 5187e79a439eeec17cc92ccc0c8cb2c9354be88e Mon Sep 17 00:00:00 2001 From: cthomas Date: Wed, 30 Apr 2025 15:20:54 -0700 Subject: [PATCH] feat: use new model-proxy in production (#1908) --- README.md | 4 ++-- letta/constants.py | 2 +- letta/llm_api/openai.py | 2 +- letta/llm_api/openai_client.py | 2 +- tests/configs/letta_hosted.json | 18 +++++++++--------- .../llm_model_configs/letta-hosted.json | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index a46cddc9..4aa9d728 100644 --- a/README.md +++ b/README.md @@ -180,7 +180,7 @@ docker exec -it $(docker ps -q -f ancestor=letta/letta) letta run In the CLI tool, you'll be able to create new agents, or load existing agents: ``` 🧬 Creating new agent... -? Select LLM model: letta-free [type=openai] [ip=https://inference.memgpt.ai] +? Select LLM model: letta-free [type=openai] [ip=https://inference.letta.com] ? Select embedding model: letta-free [type=hugging-face] [ip=https://embeddings.memgpt.ai] -> 🤖 Using persona profile: 'sam_pov' -> 🧑 Using human profile: 'basic' @@ -246,7 +246,7 @@ letta run ``` ``` 🧬 Creating new agent... -? Select LLM model: letta-free [type=openai] [ip=https://inference.memgpt.ai] +? Select LLM model: letta-free [type=openai] [ip=https://inference.letta.com] ? Select embedding model: letta-free [type=hugging-face] [ip=https://embeddings.memgpt.ai] -> 🤖 Using persona profile: 'sam_pov' -> 🧑 Using human profile: 'basic' diff --git a/letta/constants.py b/letta/constants.py index 6466798e..28cb17e2 100644 --- a/letta/constants.py +++ b/letta/constants.py @@ -4,7 +4,7 @@ from logging import CRITICAL, DEBUG, ERROR, INFO, NOTSET, WARN, WARNING LETTA_DIR = os.path.join(os.path.expanduser("~"), ".letta") LETTA_TOOL_EXECUTION_DIR = os.path.join(LETTA_DIR, "tool_execution_dir") -LETTA_MODEL_ENDPOINT = "https://inference.memgpt.ai" +LETTA_MODEL_ENDPOINT = "https://inference.letta.com" ADMIN_PREFIX = "/v1/admin" API_PREFIX = "/v1" diff --git a/letta/llm_api/openai.py b/letta/llm_api/openai.py index 578f2d02..42ad06ec 100644 --- a/letta/llm_api/openai.py +++ b/letta/llm_api/openai.py @@ -158,7 +158,7 @@ def build_openai_chat_completions_request( # data.response_format = {"type": "json_object"} if llm_config.model_endpoint == LETTA_MODEL_ENDPOINT: - # override user id for inference.memgpt.ai + # override user id for inference.letta.com import uuid data.user = str(uuid.UUID(int=0)) diff --git a/letta/llm_api/openai_client.py b/letta/llm_api/openai_client.py index 96e473c7..afd6bf47 100644 --- a/letta/llm_api/openai_client.py +++ b/letta/llm_api/openai_client.py @@ -136,7 +136,7 @@ class OpenAIClient(LLMClientBase): ) if llm_config.model_endpoint == LETTA_MODEL_ENDPOINT: - # override user id for inference.memgpt.ai + # override user id for inference.letta.com import uuid data.user = str(uuid.UUID(int=0)) diff --git a/tests/configs/letta_hosted.json b/tests/configs/letta_hosted.json index 3fd85a4c..278050a6 100644 --- a/tests/configs/letta_hosted.json +++ b/tests/configs/letta_hosted.json @@ -1,11 +1,11 @@ { - "context_window": 8192, - "model_endpoint_type": "openai", - "model_endpoint": "https://inference.memgpt.ai", - "model": "memgpt-openai", - "embedding_endpoint_type": "hugging-face", - "embedding_endpoint": "https://embeddings.memgpt.ai", - "embedding_model": "BAAI/bge-large-en-v1.5", - "embedding_dim": 1024, - "embedding_chunk_size": 300 + "context_window": 8192, + "model_endpoint_type": "openai", + "model_endpoint": "https://inference.letta.com", + "model": "memgpt-openai", + "embedding_endpoint_type": "hugging-face", + "embedding_endpoint": "https://embeddings.memgpt.ai", + "embedding_model": "BAAI/bge-large-en-v1.5", + "embedding_dim": 1024, + "embedding_chunk_size": 300 } diff --git a/tests/configs/llm_model_configs/letta-hosted.json b/tests/configs/llm_model_configs/letta-hosted.json index 82ece9e4..419cda81 100644 --- a/tests/configs/llm_model_configs/letta-hosted.json +++ b/tests/configs/llm_model_configs/letta-hosted.json @@ -1,7 +1,7 @@ { "context_window": 8192, "model_endpoint_type": "openai", - "model_endpoint": "https://inference.memgpt.ai", + "model_endpoint": "https://inference.letta.com", "model": "memgpt-openai", "put_inner_thoughts_in_kwargs": true }