Check which version of chuk-llm is installed.
()
| 6 | |
| 7 | |
| 8 | def check_chuk_llm_version(): |
| 9 | """Check which version of chuk-llm is installed.""" |
| 10 | try: |
| 11 | import chuk_llm |
| 12 | |
| 13 | print(f"✅ chuk-llm version: {getattr(chuk_llm, '__version__', 'unknown')}") |
| 14 | |
| 15 | # Check what's available |
| 16 | print("\n📦 Available chuk-llm modules:") |
| 17 | |
| 18 | # Check for 0.6 features |
| 19 | try: |
| 20 | from chuk_llm.configuration.unified_config import get_config |
| 21 | |
| 22 | print(" ✅ unified_config (v0.6 feature)") |
| 23 | |
| 24 | config = get_config() |
| 25 | providers = config.get_all_providers() |
| 26 | print(f" 📋 Providers found: {len(providers)} - {providers}") |
| 27 | |
| 28 | # Check a specific provider |
| 29 | if "openai" in providers: |
| 30 | provider_config = config.get_provider("openai") |
| 31 | print( |
| 32 | f" 🔧 OpenAI models: {len(provider_config.models)} - {provider_config.models[:3]}..." |
| 33 | ) |
| 34 | |
| 35 | except ImportError as e: |
| 36 | print(f" ❌ unified_config not available: {e}") |
| 37 | print(" 🔄 This suggests chuk-llm < 0.6") |
| 38 | |
| 39 | except ImportError as e: |
| 40 | print(f"❌ chuk-llm not installed: {e}") |
| 41 | return False |
| 42 | |
| 43 | return True |
| 44 | |
| 45 | |
| 46 | def check_api_keys(): |