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

Fix/key auth #790

Closed
wants to merge 8 commits into from
Closed

Fix/key auth #790

wants to merge 8 commits into from

Conversation

nihiragarwal24
Copy link
Contributor

Description

Added a check to verify llm api keys

Solution and Design

Whenever a user comes to the app and saves their api keys, we will once verify their api keys by calling list_models api. If it doesn't work, it surely means its a bad key

Test Plan

Tried it with bogus and verified keys. It worked perfectly.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Docs update

Checklist

  • My pull request is atomic and focuses on a single change.
  • I have read the contributing guide and my code conforms to the guidelines.
  • I have documented my changes clearly and comprehensively.
  • I have added the required tests.

@codecov
Copy link

codecov bot commented Jul 18, 2023

Codecov Report

Patch coverage: 75.00% and project coverage change: +0.09 🎉

Comparison is base (1ed1696) 58.29% compared to head (5b5ac10) 58.38%.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #790      +/-   ##
==========================================
+ Coverage   58.29%   58.38%   +0.09%     
==========================================
  Files         156      157       +1     
  Lines        6306     6327      +21     
  Branches      656      656              
==========================================
+ Hits         3676     3694      +18     
- Misses       2482     2485       +3     
  Partials      148      148              
Impacted Files Coverage Δ
superagi/llms/base_llm.py 70.58% <50.00%> (-0.85%) ⬇️
superagi/llms/google_palm.py 78.37% <75.00%> (+1.71%) ⬆️
superagi/llms/openai.py 66.66% <75.00%> (+3.25%) ⬆️
...eragi/models/types/validate_llm_api_key_request.py 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

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