-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
fix: CLI conveniences (add-on to #674) #675
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…zure, throw error if the key isn't present
…ks at the embedding endpoint config stage
cpacker
commented
Dec 22, 2023
openai_api_key = questionary.text( | ||
"Enter your OpenAI API key (starts with 'sk-', see https://platform.openai.com/api-keys):" | ||
).ask() | ||
config.save() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sarahwooders is this the correct way to save the key back to the file in "real-time" if the user provides it here?
…printed, make success text green to match others
3 tasks
sarahwooders
pushed a commit
that referenced
this pull request
Dec 26, 2023
* for openai, check for key and if missing allow user to pass it, for azure, throw error if the key isn't present * correct prior checking of azure to be more strict, added similar checks at the embedding endpoint config stage * forgot to override value in config before saving * clean up the valuerrors from missing keys so that no stacktrace gets printed, make success text green to match others
norton120
pushed a commit
to norton120/MemGPT
that referenced
this pull request
Feb 15, 2024
* for openai, check for key and if missing allow user to pass it, for azure, throw error if the key isn't present * correct prior checking of azure to be more strict, added similar checks at the embedding endpoint config stage * forgot to override value in config before saving * clean up the valuerrors from missing keys so that no stacktrace gets printed, make success text green to match others
mattzh72
pushed a commit
that referenced
this pull request
Oct 9, 2024
* for openai, check for key and if missing allow user to pass it, for azure, throw error if the key isn't present * correct prior checking of azure to be more strict, added similar checks at the embedding endpoint config stage * forgot to override value in config before saving * clean up the valuerrors from missing keys so that no stacktrace gets printed, make success text green to match others
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please describe the purpose of this pull request
Improving the workflow a bit more.
Tested: example runs of
memgpt configure
User does not have openai key set, and tries to do openai LLM
User does not have openai key set, tried to do local LLM + openai embeddings
User has no config, but openai is set in the env vars
User has no azure vars set, tries to use azure LLM (immediate error)
User has no azure vars set, tries to use local LLM but azure embedding
User has only azure LLM vars set, tries to use azure LLM + embeddings (expected success, since in
get_azure_credentials
we default from LLM->embeddings)User has only azure embedding vars set, tries to use both LLM + embeddings