Skip to content

Commit 3781555

Browse files
Add patch file to llama_index as maintainer, hopefully temporarily, replaced with trivial example (#25)
Signed-off-by: Casey Clements <[email protected]>
1 parent 0aebeda commit 3781555

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
diff --git a/llama-index-integrations/vector_stores/llama-index-vector-stores-mongodb/tests/conftest.py b/llama-index-integrations/vector_stores/llama-index-vector-stores-mongodb/tests/conftest.py
2+
index 887e807e3..d821797be 100644
3+
--- a/llama-index-integrations/vector_stores/llama-index-vector-stores-mongodb/tests/conftest.py
4+
+++ b/llama-index-integrations/vector_stores/llama-index-vector-stores-mongodb/tests/conftest.py
5+
@@ -1,6 +1,7 @@
6+
import os
7+
from typing import List
8+
import pytest
9+
+from llama_index.core import SimpleDirectoryReader
10+
from llama_index.core.ingestion import IngestionPipeline
11+
from llama_index.core.node_parser import SentenceSplitter
12+
from llama_index.core.schema import Document, TextNode
13+
@@ -11,16 +12,18 @@ from pymongo import MongoClient
14+
OPENAI_API_KEY = os.environ.get("OPENAI_API_KEY")
15+
16+
import threading
17+
+from pathlib import Path
18+
19+
lock = threading.Lock()
20+
21+
22+
@pytest.fixture(scope="session")
23+
-def documents() -> List[Document]:
24+
+def documents(tmp_path_factory) -> List[Document]:
25+
"""List of documents represents data to be embedded in the datastore.
26+
Minimum requirements for Documents in the /upsert endpoint's UpsertRequest.
27+
"""
28+
- return [Document.example()]
29+
+ data_dir = Path(__file__).parents[4] / "docs/docs/examples/data/paul_graham"
30+
+ return SimpleDirectoryReader(data_dir).load_data()
31+
32+
33+
@pytest.fixture(scope="session")

0 commit comments

Comments
 (0)