File size: 1,514 Bytes
54bef2f | 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 | """
Quick test to verify all packages are installed correctly
"""
def test_imports():
"""Test if all critical packages can be imported"""
try:
import faiss
print(f"β FAISS {faiss.__version__}")
except ImportError as e:
print(f"β FAISS import failed: {e}")
return False
try:
import langchain
print(f"β LangChain {langchain.__version__}")
except ImportError as e:
print(f"β LangChain import failed: {e}")
return False
try:
from langchain_openai import ChatOpenAI, OpenAIEmbeddings
print("β LangChain OpenAI integration")
except ImportError as e:
print(f"β LangChain OpenAI import failed: {e}")
return False
try:
from langchain_community.vectorstores import FAISS
print("β LangChain FAISS integration")
except ImportError as e:
print(f"β FAISS integration failed: {e}")
return False
try:
import fastapi
print("β FastAPI")
except ImportError as e:
print(f"β FastAPI import failed: {e}")
return False
try:
from youtube_transcript_api import YouTubeTranscriptApi
print("β YouTube Transcript API")
except ImportError as e:
print(f"β YouTube Transcript API failed: {e}")
return False
print("\nπ All packages installed successfully!")
print("Ready to run VidIQAI backend!")
return True
if __name__ == "__main__":
test_imports()
|