-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_env_vars.py
More file actions
executable file
·51 lines (43 loc) · 1.49 KB
/
test_env_vars.py
File metadata and controls
executable file
·51 lines (43 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/env python3
"""
Test script to verify environment variables are loaded correctly
"""
import os
from dotenv import load_dotenv
# Load environment variables from .env file
load_dotenv()
def test_env_vars():
"""Test that environment variables are loaded correctly"""
print("Testing environment variables...")
# Test LiteLLM API Key
api_key = os.getenv("LITELLM_API_KEY")
if api_key:
print(f"✓ LITELLM_API_KEY is set (value: {api_key[:5]}...)")
else:
print("✗ LITELLM_API_KEY is not set")
# Test LiteLLM API URL
api_url = os.getenv("LITELLM_API_URL")
if api_url:
print(f"✓ LITELLM_API_URL is set (value: {api_url})")
else:
print("✗ LITELLM_API_URL is not set")
# Test LiteLLM API Base
api_base = os.getenv("LITELLM_API_BASE")
if api_base:
print(f"✓ LITELLM_API_BASE is set (value: {api_base})")
else:
print("✗ LITELLM_API_BASE is not set")
# Test AICHAT Config Path
config_path = os.getenv("AICHAT_CONFIG_PATH")
if config_path:
print(f"✓ AICHAT_CONFIG_PATH is set (value: {config_path})")
else:
print("✗ AICHAT_CONFIG_PATH is not set")
# Test Azure Subscription ID
azure_sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
if azure_sub_id:
print(f"✓ AZURE_SUBSCRIPTION_ID is set (value: {azure_sub_id[:5]}...)")
else:
print("✗ AZURE_SUBSCRIPTION_ID is not set")
if __name__ == "__main__":
test_env_vars()