-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathverify.py
More file actions
80 lines (69 loc) · 2.58 KB
/
Copy pathverify.py
File metadata and controls
80 lines (69 loc) · 2.58 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/usr/bin/env python3
"""
Quick verification script for FlowLLM installation.
Run this after installing to verify everything works.
"""
def verify_installation():
"""Verify FlowLLM installation."""
print("🔍 Verifying FlowLLM installation...\n")
errors = []
# Test 1: Import main package
try:
import flowllm
print(f"✅ FlowLLM v{flowllm.__version__} imported successfully")
except ImportError as e:
print(f"❌ Failed to import FlowLLM: {e}")
errors.append("main_package")
return False
# Test 2: Import core components
try:
from flowllm import Agent, define_agent, define_tool
print("✅ Core components imported")
except ImportError as e:
print(f"❌ Failed to import core components: {e}")
errors.append("core_components")
# Test 3: Import providers
try:
from flowllm.providers import OpenAIProvider, AnthropicProvider, GeminiProvider
print("✅ All providers available")
except ImportError as e:
print(f"❌ Failed to import providers: {e}")
errors.append("providers")
# Test 4: Check for API keys
try:
import os
from dotenv import load_dotenv
load_dotenv()
has_openai = bool(os.getenv("OPENAI_API_KEY"))
has_anthropic = bool(os.getenv("ANTHROPIC_API_KEY"))
has_gemini = bool(os.getenv("GOOGLE_API_KEY"))
if has_openai or has_anthropic or has_gemini:
print("✅ API keys found in environment")
if has_openai:
print(" - OpenAI ✓")
if has_anthropic:
print(" - Anthropic ✓")
if has_gemini:
print(" - Gemini ✓")
else:
print("⚠️ No API keys found. Add them to .env file to use the SDK")
print(" Run: cp .env.example .env")
print(" Then edit .env with your API keys")
except Exception as e:
print(f"⚠️ Could not check for API keys: {e}")
print("\n" + "="*60)
if not errors:
print("✅ Installation verified! FlowLLM is ready to use.")
print("\n📚 Next steps:")
print(" 1. Add API keys to .env file (if not done)")
print(" 2. Try: python examples/basic_agent.py")
print(" 3. Read: QUICKSTART.md")
return True
else:
print("❌ Installation incomplete. Please reinstall:")
print(" pip install -r requirements.txt")
return False
if __name__ == "__main__":
import sys
success = verify_installation()
sys.exit(0 if success else 1)