“vinit5112” commited on
Commit
f2611d0
·
1 Parent(s): 2fb49a3

update name

Browse files
backend/backend_api.py CHANGED
@@ -48,7 +48,7 @@ async def lifespan(app: FastAPI):
48
  if not google_api_key:
49
  raise ValueError("GOOGLE_API_KEY environment variable not set")
50
 
51
- collection_name = os.getenv("COLLECTION_NAME", "ca_documents")
52
  rag_system = RAG(google_api_key, collection_name)
53
  logger.info("RAG system initialized successfully")
54
 
 
48
  if not google_api_key:
49
  raise ValueError("GOOGLE_API_KEY environment variable not set")
50
 
51
+ collection_name = os.getenv("COLLECTION_NAME", "ca-documents")
52
  rag_system = RAG(google_api_key, collection_name)
53
  logger.info("RAG system initialized successfully")
54
 
backend/rag.py CHANGED
@@ -7,7 +7,7 @@ import os
7
  from langchain_text_splitters import RecursiveCharacterTextSplitter
8
 
9
  class RAG:
10
- def __init__(self, google_api_key: str, collection_name: str = "ca_documents"):
11
  # Setup Gemini
12
  # The client gets the API key from the environment variable `GOOGLE_API_KEY`
13
  # or from the `api_key` argument.
@@ -187,7 +187,7 @@ if __name__ == "__main__":
187
  # Initialize
188
  rag = RAG(
189
  google_api_key="your_google_api_key",
190
- collection_name="ca_documents"
191
  )
192
 
193
  # Upload documents
 
7
  from langchain_text_splitters import RecursiveCharacterTextSplitter
8
 
9
  class RAG:
10
+ def __init__(self, google_api_key: str, collection_name: str = "ca-documents"):
11
  # Setup Gemini
12
  # The client gets the API key from the environment variable `GOOGLE_API_KEY`
13
  # or from the `api_key` argument.
 
187
  # Initialize
188
  rag = RAG(
189
  google_api_key="your_google_api_key",
190
+ collection_name="ca-documents"
191
  )
192
 
193
  # Upload documents
backend/vector_store.py CHANGED
@@ -15,7 +15,7 @@ logger = logging.getLogger(__name__)
15
 
16
  class VectorStore:
17
  def __init__(self):
18
- self.collection_name = "ca_documents"
19
 
20
  # Get Qdrant configuration from environment variables
21
  qdrant_url = os.getenv("QDRANT_URL")
 
15
 
16
  class VectorStore:
17
  def __init__(self):
18
+ self.collection_name = "ca-documents"
19
 
20
  # Get Qdrant configuration from environment variables
21
  qdrant_url = os.getenv("QDRANT_URL")