Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

docs: Update OpenAI assistants example to use `memgpt server` (#1012)

Sarah Wooders60cd5ec56b4b
diff --git a/examples/openai_client_assistants.py b/examples/openai_client_assistants.py
index e6c82ee08..ca21451d6 100644
--- a/examples/openai_client_assistants.py
+++ b/examples/openai_client_assistants.py
@@ -4,14 +4,12 @@ import time
"""
This script provides an example of how you can use OpenAI's python client with a MemGPT server.
-Before running this example, make sure you start the OpenAI-compatible REST server:
- cd memgpt/server/rest_api/openai_assistants
- poetry run uvicorn assistants:app --reload --port 8080
+Before running this example, make sure you start the OpenAI-compatible REST server with `memgpt server`.
"""
def main():
- client = OpenAI(base_url="http://127.0.0.1:8080/v1")
+ client = OpenAI(base_url="http://localhost:8283/v1")
# create assistant (creates a memgpt preset)
assistant = client.beta.assistants.create(
diff --git a/memgpt/server/rest_api/openai_assistants/assistants.py b/memgpt/server/rest_api/openai_assistants/assistants.py
index 6b1376734..6336b6105 100644
--- a/memgpt/server/rest_api/openai_assistants/assistants.py
+++ b/memgpt/server/rest_api/openai_assistants/assistants.py
@@ -37,14 +37,6 @@ from memgpt.models.openai import (
from memgpt.data_types import LLMConfig, EmbeddingConfig, Message
from memgpt.constants import DEFAULT_PRESET
-"""
-Basic REST API sitting on top of the internal MemGPT python server (SyncServer)
-
-Start the server with:
- cd memgpt/server/rest_api/openai_assistants
- poetry run uvicorn assistants:app --reload --port 8080
-"""
-
router = APIRouter()