Commit ·
4696f8c
1
Parent(s): bfb179c
Shipgit add .
Browse files- app.py +4 -2
- requirements.txt +8 -8
app.py
CHANGED
|
@@ -56,8 +56,10 @@ rag_prompt = ChatPromptTemplate.from_template("""\
|
|
| 56 |
vectorstore = VectorStore(
|
| 57 |
collection_name="mg_alloy_collection_snowflake",
|
| 58 |
)
|
| 59 |
-
|
| 60 |
-
|
|
|
|
|
|
|
| 61 |
retriever = vectorstore.as_retriever(k=5)
|
| 62 |
|
| 63 |
# ------- Pydantic Models ------- #
|
|
|
|
| 56 |
vectorstore = VectorStore(
|
| 57 |
collection_name="mg_alloy_collection_snowflake",
|
| 58 |
)
|
| 59 |
+
if not os.path.exists("data/collections/collection"):
|
| 60 |
+
documents = VectorStore.load_chunks_as_documents("data/contextual_chunks")
|
| 61 |
+
vectorstore.add_documents(documents)
|
| 62 |
+
|
| 63 |
retriever = vectorstore.as_retriever(k=5)
|
| 64 |
|
| 65 |
# ------- Pydantic Models ------- #
|
requirements.txt
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
chainlit==0.7.700
|
| 2 |
-
langchain-huggingface
|
| 3 |
-
langchain
|
| 4 |
-
langchain_openai
|
| 5 |
-
langchain_cohere
|
| 6 |
-
langgraph
|
| 7 |
-
qdrant-client
|
| 8 |
-
langchain-qdrant
|
| 9 |
-
fastembed
|
| 10 |
grpcio==1.67.1
|
|
|
|
| 1 |
chainlit==0.7.700
|
| 2 |
+
langchain-huggingface
|
| 3 |
+
langchain
|
| 4 |
+
langchain_openai
|
| 5 |
+
langchain_cohere
|
| 6 |
+
langgraph
|
| 7 |
+
qdrant-client
|
| 8 |
+
langchain-qdrant
|
| 9 |
+
fastembed
|
| 10 |
grpcio==1.67.1
|