deshnaashok commited on
Commit
f300018
Β·
1 Parent(s): 2ea4404

Remove duplicate mis-indented try/except block; fix runtime error

Browse files
Files changed (1) hide show
  1. enhanced_rag_chatbot.py +0 -14
enhanced_rag_chatbot.py CHANGED
@@ -60,21 +60,7 @@ class EnhancedRAGChatbot:
60
 
61
  # Conversation history
62
  self.conversation_history: List[Dict[str, str]] = []
63
-
64
  print("βœ… Enhanced RAG Chatbot with Groq ready!")
65
-
66
- try:
67
- self.collection = self.client.get_collection("rackspace_knowledge")
68
- except Exception as e:
69
- print("❌ Vector DB or collection missing! Attempting to rebuild...")
70
- try:
71
- import subprocess
72
- subprocess.run(["python", "enhanced_vector_db.py"], check=True)
73
- self.collection = self.client.get_collection("rackspace_knowledge")
74
- print("βœ… Vector DB rebuilt successfully!")
75
- except Exception as rebuild_e:
76
- print("❌ Failed to rebuild vector DB. Please run 'python enhanced_vector_db.py' manually.")
77
- self.collection = None
78
  """Retrieve relevant context with source information"""
79
  # Generate query embedding
80
  query_embedding = self.embedding_model.encode([query])[0]
 
60
 
61
  # Conversation history
62
  self.conversation_history: List[Dict[str, str]] = []
 
63
  print("βœ… Enhanced RAG Chatbot with Groq ready!")
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  """Retrieve relevant context with source information"""
65
  # Generate query embedding
66
  query_embedding = self.embedding_model.encode([query])[0]