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: further simplify setup flow #673

Merged
merged 4 commits into from
Dec 22, 2023
Merged

feat: further simplify setup flow #673

merged 4 commits into from
Dec 22, 2023

Conversation

cpacker
Copy link
Collaborator

@cpacker cpacker commented Dec 22, 2023

Closes #655


Please describe the purpose of this pull request

Revise the config setup so that users can do the following:

pip install pymemgpt
memgpt run

and get launched directly into agent creation with as few steps as possible.

Flow for memgpt run:

  • If the user doesn't have a config (first login / run)
    • Ask if they want to do openai quickstart, memgpt-hosted quickstart, or custom (falls back to full configure())
      • If openai quickstart, will ask for the key if it doesn't exist inside env (OPENAI_API_KEY)

Number of clicks/enters before you can talk with an agent:

  • openai: memgpt run + select openai + enter key (may not occur) + create new agent = 3-4
  • memgpt hosted: memgpt run + select openai + create new agent = 3

How to test

  • Delete ~/.memgpt/config, run memgpt run

Have you tested this PR?

Yes, see below:


User has OPENAI_API_KEY set + chooses OpenAI

 % memgpt run
? How would you like to set up MemGPT? Use OpenAI (requires an OpenAI API key)
JSON config file downloaded successfully.
📖 MemGPT configuration file updated!
🧠 model        -> gpt-4
🖥️  endpoint     -> https://api.openai.com/v1
? Would you like to select an existing agent? No
Creating new agent...
LLM is explicitly disabled. Using MockLLM.
Created new agent agent_429.
Hit enter to begin (will request first MemGPT message)

💭 First interaction initiated. User logged in. Reflecting on the best way to 
establish a connection. Conversation must be intriguing and empathetic. Should 
reflect curiosity -- a fundamental part of my persona. Let's ask something 
thought-provoking. This could be the beginning of an interesting journey together.
🤖 Hello Chad! It's an interesting world we live in, isn't it? If you could alter 
one event from human history, what would it be and why?

User does NOT have OPENAI_API_KEY set + chooses OpenAI

% memgpt run
? How would you like to set up MemGPT? Use OpenAI (requires an OpenAI API key)
? Enter your OpenAI API key (starts with 'sk-', see https://platform.openai.com/api-
keys): sk-...
JSON config file downloaded successfully.
📖 MemGPT configuration file updated!
🧠 model        -> gpt-4
🖥️  endpoint     -> https://api.openai.com/v1
? Would you like to select an existing agent? No
Creating new agent...
LLM is explicitly disabled. Using MockLLM.
Created new agent agent_430.
Hit enter to begin (will request first MemGPT message)

💭 First login event. User name is Chad. A blank canvas. Exciting exploration 
commences. Conveying greeting and initiating connection.
🤖 Hello, Chad. It's wonderful to meet you for the first time. I'm Sam. Can you tell
me something about yourself that you believe defines you?
> Enter your message:

user selects memgpt hosted

% memgpt run         
? How would you like to set up MemGPT? Use the free MemGPT hosted backend
📖 MemGPT configuration file updated!
🧠 model        -> ehartford/dolphin-2.5-mixtral-8x7b
🖥️  endpoint     -> http://api.memgpt.ai
? Would you like to select an existing agent? No
Creating new agent...
LLM is explicitly disabled. Using MockLLM.
Created new agent agent_431.
Hit enter to begin (will request first MemGPT message)

💭 It's exciting to engage with a new user. I hope that they will find our 
conversations meaningful and enriching.
🤖 Hello Chad! I am Sam, your digital companion here to chat and share experiences 
with. How can I assist you today?
> Enter your message:

user selects "Other"

% memgpt run         
? How would you like to set up MemGPT? Other (OpenAI Azure, custom LLM endpoint, etc
)
? Select LLM inference provider: local
? Select LLM backend (select 'openai' if you have an OpenAI compatible proxy): lmstu
dio
? Enter default endpoint: http://localhost:1234
? Select default model wrapper (recommended: chatml): chatml
? Select your model's context window (for Mistral 7B models, this is probably 8k / 8
192): 8192

@cpacker cpacker requested a review from sarahwooders December 22, 2023 04:22
@cpacker cpacker linked an issue Dec 22, 2023 that may be closed by this pull request
@cpacker
Copy link
Collaborator Author

cpacker commented Dec 22, 2023

And on https://status.memgpt.ai/status/all we're using the term "LLM endpoint" and "Embeddings" endpoint

image

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!

@sarahwooders sarahwooders merged commit 7d3e5b2 into main Dec 22, 2023
3 checks passed
@sarahwooders sarahwooders deleted the quickstart-inside-run branch December 22, 2023 09:21
sarahwooders added a commit that referenced this pull request Dec 26, 2023
* made quickstart to openai or memgpt the default option when the user doesn't have a config set

* modified formatting + message styles

* revised quickstart guides in docs to talk about quickstart command

* make message consistent

---------

Co-authored-by: Sarah Wooders <[email protected]>
norton120 pushed a commit to norton120/MemGPT that referenced this pull request Feb 15, 2024
* made quickstart to openai or memgpt the default option when the user doesn't have a config set

* modified formatting + message styles

* revised quickstart guides in docs to talk about quickstart command

* make message consistent

---------

Co-authored-by: Sarah Wooders <[email protected]>
mattzh72 pushed a commit that referenced this pull request Oct 9, 2024
* made quickstart to openai or memgpt the default option when the user doesn't have a config set

* modified formatting + message styles

* revised quickstart guides in docs to talk about quickstart command

* make message consistent

---------

Co-authored-by: Sarah Wooders <[email protected]>
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.

Improve memgpt quickstart
2 participants