Skip to content

Commit

Permalink
docs: Update OpenAI assistants example to use memgpt server (#1012)
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahwooders authored Feb 15, 2024
1 parent 9c39e8c commit d8f3d04
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
6 changes: 2 additions & 4 deletions examples/openai_client_assistants.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@
"""
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(
Expand Down
8 changes: 0 additions & 8 deletions memgpt/server/rest_api/openai_assistants/assistants.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,6 @@
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()


Expand Down

0 comments on commit d8f3d04

Please sign in to comment.