austinbv
commited on
Commit
·
9f6b354
1
Parent(s):
861cd81
move db url to an env variable
Browse files- .gitattributes +1 -0
- importer/load_and_process.py +2 -2
.gitattributes
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
*.pdf filter=lfs diff=lfs merge=lfs -text
|
importer/load_and_process.py
CHANGED
@@ -23,7 +23,7 @@ docs = loader.load()
|
|
23 |
embeddings = OpenAIEmbeddings(model=EMBEDDING_MODEL, )
|
24 |
|
25 |
text_splitter = SemanticChunker(
|
26 |
-
embeddings=
|
27 |
)
|
28 |
|
29 |
chunks = text_splitter.split_documents(docs)
|
@@ -32,6 +32,6 @@ PGVector.from_documents(
|
|
32 |
documents=chunks,
|
33 |
embedding=embeddings,
|
34 |
collection_name=PG_COLLECTION_NAME,
|
35 |
-
connection_string="
|
36 |
pre_delete_collection=True,
|
37 |
)
|
|
|
23 |
embeddings = OpenAIEmbeddings(model=EMBEDDING_MODEL, )
|
24 |
|
25 |
text_splitter = SemanticChunker(
|
26 |
+
embeddings=embeddings
|
27 |
)
|
28 |
|
29 |
chunks = text_splitter.split_documents(docs)
|
|
|
32 |
documents=chunks,
|
33 |
embedding=embeddings,
|
34 |
collection_name=PG_COLLECTION_NAME,
|
35 |
+
connection_string=os.getenv("POSTGRES_URL"),
|
36 |
pre_delete_collection=True,
|
37 |
)
|