Skip to content

Handle errors gracefully #53

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

Merged
merged 2 commits into from
Oct 26, 2023
Merged

Handle errors gracefully #53

merged 2 commits into from
Oct 26, 2023

Conversation

orangetin
Copy link
Member

Output from CLI:

10-26-2023 14:09:17 - together.commands.complete - CRITICAL - TOGETHER_API_KEY not found.
Please set it as an environment variable or set it as together.api_key
Find your TOGETHER_API_KEY at https://api.together.xyz/settings/api-keys (complete.py:147)

Output from library:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/abhy/coding/github.com/together/src/together/complete.py", line 41, in create
    response = create_post_request(
  File "/Users/abhy/coding/github.com/together/src/together/utils.py", line 86, in create_post_request
    verify_api_key()
  File "/Users/abhy/coding/github.com/together/src/together/utils.py", line 58, in verify_api_key
    raise together.AuthenticationError(together.MISSING_API_KEY_MESSAGE)
together.error.AuthenticationError: TOGETHER_API_KEY not found.
Please set it as an environment variable or set it as together.api_key
Find your TOGETHER_API_KEY at https://api.together.xyz/settings/api-keys

- Also remove commented out code
@orangetin orangetin requested review from clam004 and justusc October 26, 2023 21:15
@orangetin orangetin merged commit fb5b85b into main Oct 26, 2023
@justusc justusc deleted the orangetin/handle-errors-fix branch October 26, 2023 21:22
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