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
A quick workaround might unset this variable altogether:
|
def __init__(self): |
|
self.api_key = os.environ.get("ANTHROPIC_API_KEY") |
|
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:
|
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"), |
|
) |
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
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
bolt-python-ai-chatbot/ai/providers/openai.py
Lines 19 to 20 in 2d9d836
Note
The
vertexprovider 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