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: Create RESTClient and Admin client for interacting with server from python #1033

Merged
merged 18 commits into from
Feb 22, 2024

Conversation

sarahwooders
Copy link
Collaborator

@sarahwooders sarahwooders commented Feb 19, 2024

Please describe the purpose of this pull request.
This refactors the client to have both a LocalClient and RESTClient, where the latter connects to a running server. The quickstart configuration is also removed, since the client it not responsible for configuring the LLM/embedding endpoints (this is controlled by the server).

User Identification

A single Client instance corresponds to a single user.

  • The user is identified via the provided token for the RESTClient.
  • For the LocalClient (which does not require authentication, since it does not connect through the REST server), there is an associated user_id which is read from ~/.memgpt/config.

User Creation

  • When using with memgpt server, users are created via a special Admin() client which can run admin commands
  • When running memgpt locally, a user is created when memgpt configure is run

@sarahwooders sarahwooders changed the title Create RESTClient and Admin client for interacting with server from python feat: Create RESTClient and Admin client for interacting with server from python Feb 19, 2024
@sarahwooders sarahwooders requested a review from cpacker February 20, 2024 04:42
Copy link
Collaborator

@cpacker cpacker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM left some comments but they don't necessarily need to addressed in this PR

memgpt/client/client.py Outdated Show resolved Hide resolved
docs/python_client.md Show resolved Hide resolved
examples/memgpt_client.py Show resolved Hide resolved
@sarahwooders sarahwooders merged commit 9ada3ef into main Feb 22, 2024
4 checks passed
@sarahwooders sarahwooders deleted the client-rest branch February 22, 2024 19:16
mattzh72 pushed a commit that referenced this pull request Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants