-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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: fixed ui-ux for api-key-manager component #732
fix: fixed ui-ux for api-key-manager component #732
Conversation
Adithyan777
commented
Dec 15, 2024
- Modified the API Key Manager to show users whether the API key is set via environment variables or the UI.
- Implemented an API route to check and report the API key status dynamically based on the model provider.
- The API key set via the UI is reset when the user switches to a different model provider
bro can you tell me step by step how to run this project on vs code |
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.
This is a great implementation, it keeps the keys safe and gives feedback.
I have added some comments please check those, after that its good to merge
hi @Adithyan777, I want to merge this for the next release, will you be addressing the changes I have mentioned in the review, so that i can queue up this for next release? |
hi @thecodacus , I apologize for the delay in addressing the requested changes. I’m currently traveling and won’t have access to my computer for the next 3-4 days. Once I’m back, I’ll prioritize implementing the changes and notify you as soon as they are ready. |
sure, thanks for the update |
1. moved function definiton to useCallback. 2. added a cache to store the env key status and the api call is made only on a cache miss.
- Persist API keys in cookies when entered via UI - Automatically load saved keys when switching between providers - Preserve existing functionality for environment variable based keys
hi @thecodacus, I've addressed most of the requested changes from the review. However, for the suggestion to import the map from utils/constants file , I couldn't locate it. Could you confirm if it's defined elsewhere, or provide more details on where I can find it? |
hi @thecodacus , I've addressed all the requested changes. Let me know if there's anything else to change. |
everything looks good except the apikey set on provider change might be redundant block. |
…ady handled by APIKeyManager component.