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: Add memgpt quickstart command #641

Merged
merged 8 commits into from
Dec 20, 2023
Merged

feat: Add memgpt quickstart command #641

merged 8 commits into from
Dec 20, 2023

Conversation

cpacker
Copy link
Collaborator

@cpacker cpacker commented Dec 18, 2023

Please describe the purpose of this pull request

Add memgpt quickstart to allow users to immediately start using the hosted endpoint (or openai/azure) w/o copy-paste.

I've set things up so that the quickstart configs (.json) files are actually pulled from the internet (the repo main), that way we can update eg the memgpt hosted endpoint details on-the-fly with commits to main.

How to test

  • memgpt quickstart
    • Simple, should just pull from remote url
  • memgpt quickstart --type openai
    • To make this a true "one-click", we should check for the existence of OPENAI_API_KEY and throw a nice error here
  • memgpt quickstart --type azure
    • Similarly, we should check for the existence of all the necessary Azure variables and throw a nice error

Have you tested this PR?

Yes, see examples below.

  • memgpt quickstart
  • memgpt quickstart --type openai
    - [ ] memgpt quickstart azure

Note: Azure is a little complicated, should put in separate PR.

Outstanding questions

  • Should we pull configs from GitHub? Can also put the configs inside the gh-pages assets directory, so the wget goes to memgpt.ai/... instead of a GitHub link
  • Should we store configs in memgpt/configs? Naming? (memgpt/example_configs?)
  • Should we store JSON? YAML?
  • Change command convention? eg memgpt quickstart --type openai could just be memgpt openai

Examples:

% memgpt quickstart --debug
JSON config file downloaded successfully.
Replacing config model: gpt-4 -> ehartford/dolphin-2.5-mixtral-8x7b
Replacing config model_endpoint_type: openai -> vllm
Replacing config model_endpoint: https://api.openai.com/v1 -> http://api.memgpt.ai
Replacing config model_wrapper: None -> airoboros-l2-70b-2.1
Replacing config context_window: 8192 -> 32768
Replacing config embedding_endpoint_type: openai -> hugging-face
Replacing config embedding_endpoint: https://api.openai.com/v1 -> http://embeddings.memgpt.ai
Replacing config embedding_model: None -> BAAI/bge-large-en-v1.5
Skipping new config embedding_dim: 1536 == 1536
Skipping new config embedding_chunk_size: 300 == 300
Saving new config file.
% memgpt quickstart --debug --type openai
? Enter your OpenAI API key (starts with 'sk..'): dummy key
JSON config file downloaded successfully.
Replacing config model: ehartford/dolphin-2.5-mixtral-8x7b -> gpt-4
Replacing config model_endpoint_type: vllm -> openai
Replacing config model_endpoint: http://api.memgpt.ai -> https://api.openai.com/v1
Replacing config model_wrapper: airoboros-l2-70b-2.1 -> None
Replacing config context_window: 32768 -> 8192
Replacing config openai_key: sk-... -> dummy key
Replacing config embedding_endpoint_type: hugging-face -> openai
Replacing config embedding_endpoint: http://embeddings.memgpt.ai -> https://api.openai.com/v1
Replacing config embedding_model: BAAI/bge-large-en-v1.5 -> None
Skipping new config embedding_dim: 1536 == 1536
Skipping new config embedding_chunk_size: 300 == 300
Saving new config file.

@cpacker cpacker marked this pull request as draft December 18, 2023 08:59
@cpacker cpacker marked this pull request as ready for review December 18, 2023 09:23
@cpacker cpacker requested a review from sarahwooders December 18, 2023 09:23
memgpt/cli/cli.py Outdated Show resolved Hide resolved
@cpacker cpacker added the priority Merge ASAP label Dec 18, 2023
@sarahwooders
Copy link
Collaborator

What do you think of doing memgpt run --config openai ?

Copy link
Collaborator

@sarahwooders sarahwooders left a comment

Choose a reason for hiding this comment

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

lgtm!

memgpt/cli/cli.py Outdated Show resolved Hide resolved
@cpacker cpacker merged commit 77584a9 into main Dec 20, 2023
3 checks passed
@cpacker cpacker deleted the quickstart-command branch December 22, 2023 18:35
sarahwooders pushed a commit that referenced this pull request Dec 26, 2023
* Revert "Revert "nonfunctional 404 quickstart command w/ some other typo corrections""

This reverts commit 5dbdf31.

* Revert "Revert "added example config file""

This reverts commit 72a58f6.

* tested and working

* added and tested openai quickstart, added fallback if internet 404's to pull from local copy

* typo

* updated openai key input message to include html link

* renamed --type to --backend, added --latest flag which fetches from online default is to pull from local file

* fixed links
norton120 pushed a commit to norton120/MemGPT that referenced this pull request Feb 15, 2024
* Revert "Revert "nonfunctional 404 quickstart command w/ some other typo corrections""

This reverts commit 5dbdf31.

* Revert "Revert "added example config file""

This reverts commit 72a58f6.

* tested and working

* added and tested openai quickstart, added fallback if internet 404's to pull from local copy

* typo

* updated openai key input message to include html link

* renamed --type to --backend, added --latest flag which fetches from online default is to pull from local file

* fixed links
mattzh72 pushed a commit that referenced this pull request Oct 9, 2024
* Revert "Revert "nonfunctional 404 quickstart command w/ some other typo corrections""

This reverts commit 53df32c.

* Revert "Revert "added example config file""

This reverts commit 8499a82.

* tested and working

* added and tested openai quickstart, added fallback if internet 404's to pull from local copy

* typo

* updated openai key input message to include html link

* renamed --type to --backend, added --latest flag which fetches from online default is to pull from local file

* fixed links
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority Merge ASAP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants