-
Notifications
You must be signed in to change notification settings - Fork 219
Closed
Description
- I have read and agree to the contributing guidelines.
Describe the issue
Missing API keys show up in logs/errors as timeouts/retries that require an interruption to proceed.
Describe the solution you'd like
Could we surface a "missing api key" error that halts the script execution?
Additional context
from griptape.structures import Agent
agent = Agent()
agent.run('What are the colors of the rainbow?')
Results in:
[12/17/24 09:47:05] INFO PromptTask 688ec1b7830f4d6ebf2df8310b5c41e6
Input: What are the colors of the rainbow?
WARNING:root:<RetryCallState 4383057408: attempt #1; slept for 0.0; last result: failed (OpenAIError The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable)>
WARNING:root:<RetryCallState 4383057408: attempt #2; slept for 2.0; last result: failed (OpenAIError The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable)>
WARNING:root:<RetryCallState 4383057408: attempt #3; slept for 4.0; last result: failed (OpenAIError The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable)>
...<interrupted>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels