import os from dotenv import load_dotenv load_dotenv() print("--- ENV DEBUG ---") hf_key = os.getenv("HUGGINGFACE_API_KEY") print(f"HF Key present: {bool(hf_key)}") print(f"HF Key start: {hf_key[:4] if hf_key else 'None'}") print("\n--- LIBRARY DEBUG ---") try: import huggingface_hub print(f"huggingface_hub version: {huggingface_hub.__version__}") except ImportError: print("huggingface_hub NOT installed") try: from huggingface_hub import AsyncInferenceClient print("AsyncInferenceClient imported successfully") except ImportError as e: print(f"AsyncInferenceClient import FAILED: {e}") try: from huggingface_hub import InferenceClient print("InferenceClient imported successfully") except ImportError as e: print(f"InferenceClient import FAILED: {e}") print("\n--- VECTOR DB DEBUG ---") try: import faiss print(f"FAISS imported successfully") except ImportError: print("FAISS NOT installed") try: from sentence_transformers import SentenceTransformer print("SentenceTransformer imported successfully") except ImportError: print("SentenceTransformer NOT installed") print("\n--- APP CONFIG DEBUG ---") try: from app.core.config import settings print(f"Settings HF Key: {bool(settings.HUGGINGFACE_API_KEY)}") except Exception as e: print(f"Could not load settings: {e}")