Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add patch file to llama_index #25

Merged
merged 1 commit into from
May 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
33 changes: 33 additions & 0 deletions llama_index/patches/example_data.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
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
index 887e807e3..d821797be 100644
--- 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
@@ -1,6 +1,7 @@
import os
from typing import List
import pytest
+from llama_index.core import SimpleDirectoryReader
from llama_index.core.ingestion import IngestionPipeline
from llama_index.core.node_parser import SentenceSplitter
from llama_index.core.schema import Document, TextNode
@@ -11,16 +12,18 @@ from pymongo import MongoClient
OPENAI_API_KEY = os.environ.get("OPENAI_API_KEY")

import threading
+from pathlib import Path

lock = threading.Lock()


@pytest.fixture(scope="session")
-def documents() -> List[Document]:
+def documents(tmp_path_factory) -> List[Document]:
"""List of documents represents data to be embedded in the datastore.
Minimum requirements for Documents in the /upsert endpoint's UpsertRequest.
"""
- return [Document.example()]
+ data_dir = Path(__file__).parents[4] / "docs/docs/examples/data/paul_graham"
+ return SimpleDirectoryReader(data_dir).load_data()


@pytest.fixture(scope="session")