generated from slack-samples/bolt-python-starter-template
-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Some confusion might arise if environment variables are set as empty strings! These providers might still appear in dropdown selections, but will not have a valid token to use.
Preview
$ echo $OPENAI_API_KEY
A quick workaround might unset this variable altogether:
$ unset OPENAI_API_KEYbolt-python-ai-chatbot/ai/providers/anthropic.py
Lines 22 to 23 in 2d9d836
| def __init__(self): | |
| self.api_key = os.environ.get("ANTHROPIC_API_KEY") |
bolt-python-ai-chatbot/ai/providers/openai.py
Lines 19 to 20 in 2d9d836
| def __init__(self): | |
| self.api_key = os.environ.get("OPENAI_API_KEY") |
Note
The vertex provider has a guard for this when checking if a Google project should be used:
bolt-python-ai-chatbot/ai/providers/vertexai.py
Lines 72 to 78 in 2d9d836
| def __init__(self): | |
| self.enabled = bool(os.environ.get("VERTEX_AI_PROJECT_ID", "")) | |
| if self.enabled: | |
| vertexai.init( | |
| project=os.environ.get("VERTEX_AI_PROJECT_ID"), | |
| location=os.environ.get("VERTEX_AI_LOCATION"), | |
| ) |
srtaalej
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working