philmui commited on
Commit
31b9669
1 Parent(s): 866ea3c

using memory for qdrant

Browse files
Files changed (3) hide show
  1. .gitignore +3 -0
  2. globals.py +3 -2
  3. semantic.py +2 -2
.gitignore CHANGED
@@ -2,3 +2,6 @@ wandb/
2
  .env
3
  __pycache__/data/qdrant/*
4
  *.sqlite
 
 
 
 
2
  .env
3
  __pycache__/data/qdrant/*
4
  *.sqlite
5
+ __pycache__/*
6
+ data/.lock
7
+ data/qdrant
globals.py CHANGED
@@ -14,7 +14,8 @@ embeddings = OpenAIEmbeddings(model="text-embedding-3-small")
14
  DEFAULT_QUESTION1 = "What was the total value of 'Cash and cash equivalents' as of December 31, 2023?"
15
  DEFAULT_QUESTION2 = "Who are 'Directors' (i.e., members of the Board of Directors) for Meta?"
16
 
17
- VECTOR_STORE_PATH = "./data"
18
- META_10K_FILE_PATH = "./data/meta-10k-2023.pdf"
 
19
  META_SEMANTIC_COLLECTION = "meta10k-semantic"
20
 
 
14
  DEFAULT_QUESTION1 = "What was the total value of 'Cash and cash equivalents' as of December 31, 2023?"
15
  DEFAULT_QUESTION2 = "Who are 'Directors' (i.e., members of the Board of Directors) for Meta?"
16
 
17
+ ROOT_PATH = "./meta2023"
18
+ VECTOR_STORE_PATH = f"{ROOT_PATH}/data/qdrant"
19
+ META_10K_FILE_PATH = f"{ROOT_PATH}/data/meta-10k-2023.pdf"
20
  META_SEMANTIC_COLLECTION = "meta10k-semantic"
21
 
semantic.py CHANGED
@@ -27,8 +27,8 @@ from globals import (
27
  )
28
 
29
  from qdrant_client import QdrantClient
30
- # qdrant_client = QdrantClient(path=VECTOR_STORE_PATH)
31
- qdrant_client = QdrantClient(":memory:")
32
 
33
 
34
  RAG_PROMPT = """
 
27
  )
28
 
29
  from qdrant_client import QdrantClient
30
+ qdrant_client = QdrantClient(path=VECTOR_STORE_PATH)
31
+ # qdrant_client = QdrantClient(":memory:")
32
 
33
 
34
  RAG_PROMPT = """