AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

feat(autogpt): Handle OpenAI API key exceptions gracefully

Open kcze opened this issue 11 months ago • 1 comments

OPEN-337, OPEN-305

  • Better handle no API keys or invalid ones
  • Handle exception and exit when invalid key is provided
  • Handle any APIError exception when trying to get OpenAI models and exit

kcze avatar Mar 08 '24 15:03 kcze

Deploy Preview for auto-gpt-docs canceled.

Name Link
Latest commit 357e3cdb0be3e46f092a6e69d499463456404093
Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/65fd5c8bad067c000822f57b

netlify[bot] avatar Mar 08 '24 15:03 netlify[bot]

This PR needs updating because clean_input is no longer async (since 632686cfa5f5590642016bbc0f976a037ed3d361). I'll do that myself if you don't get to it.

Pwuts avatar Mar 21 '24 17:03 Pwuts

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

github-actions[bot] avatar Mar 21 '24 21:03 github-actions[bot]

Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.

github-actions[bot] avatar Mar 21 '24 21:03 github-actions[bot]

This PR needs updating because clean_input is no longer async (since 632686c). I'll do that myself if you don't get to it.

Done

kcze avatar Mar 21 '24 21:03 kcze

Codecov Report

Attention: Patch coverage is 25.92593% with 20 lines in your changes are missing coverage. Please review.

Project coverage is 45.40%. Comparing base (dde0c70) to head (357e3cd). Report is 1 commits behind head on master.

Files Patch % Lines
autogpts/autogpt/autogpt/config/config.py 16.66% 15 Missing :warning:
autogpts/autogpt/autogpt/llm/api_manager.py 57.14% 3 Missing :warning:
autogpts/autogpt/autogpt/app/main.py 0.00% 2 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6992      +/-   ##
==========================================
- Coverage   45.54%   45.40%   -0.15%     
==========================================
  Files         139      139              
  Lines        6514     6530      +16     
  Branches      915      917       +2     
==========================================
- Hits         2967     2965       -2     
- Misses       3397     3413      +16     
- Partials      150      152       +2     
Flag Coverage Δ
Linux 45.40% <25.92%> (-0.04%) :arrow_down:
Windows ?
autogpt-agent 45.40% <25.92%> (-0.12%) :arrow_down:
macOS ?

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Mar 22 '24 10:03 codecov[bot]