Skip to content

Commit 13719f9

Browse files
authored
Merge pull request #36 from Jibola/PYTHON-4680-local-llama
PYTHON-4680 Make llama-index use local atlas
2 parents 25a448d + 4e27104 commit 13719f9

File tree

5 files changed

+25
-2
lines changed

5 files changed

+25
-2
lines changed

.evergreen/scaffold_atlas.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ def generate_collections(database: Database, collection_jsons: list[Path]) -> No
103103

104104

105105
def generate_indexes(client: MongoClient, index_jsons: list[Path]) -> None:
106-
"""_summary_
106+
"""Generate Search or VectorSearch indexes based on the index_json provided
107+
TODO: **Improve Documentation to include Local Atlas JSON configuration requirements*
107108
108109
Args:
109110
client (MongoClient): MongoClient

llama-index-python-kvstore/run.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ $PYTHON_BINARY -m pip install -U pip poetry
1717
$PYTHON_BINARY -m poetry env use $PYTHON_BINARY
1818
# Activate the poetry env, which itself does not include poetry
1919
source $($PYTHON_BINARY -m poetry env info --path)/bin/activate
20+
# PYTHON-4522: Will fix requirement in llama-index repo
21+
$PYTHON_BINARY -m poetry add motor
2022
# Recreate the poetry lock file
2123
$PYTHON_BINARY -m poetry lock --no-update
2224
# Install from pyproject.toml into package specific environment
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"mappings": {
3+
"dynamic": false,
4+
"fields": {
5+
"text": [
6+
{
7+
"type": "string"
8+
}
9+
]
10+
}
11+
},
12+
"name": "fulltext_index",
13+
"type": "search",
14+
"database": "llama_index_test_db",
15+
"collectionName": "llama_index_test_vectorstore"
16+
}

llama-index-python-vectorstore/indexes/vector_index.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
"path": "embedding",
66
"similarity": "cosine",
77
"type": "vector"
8+
},
9+
{
10+
"path": "metadata.text",
11+
"type": "filter"
812
}
913
],
1014
"name": "vector_index",

llama-index-python-vectorstore/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ $PYTHON_BINARY -m poetry lock --no-update
2222
$PYTHON_BINARY -m poetry install --with dev
2323

2424
# Run tests. Sensitive variables in Evergreen come from Evergreen project: ai-ml-pipeline-testing/
25+
MONGODB_URI=$(fetch_local_atlas_uri) \
2526
OPENAI_API_KEY=$openai_api_key \
26-
MONGODB_URI=$llama_index_mongodb_uri \
2727
MONGODB_DATABASE="llama_index_test_db" \
2828
MONGODB_COLLECTION="llama_index_test_vectorstore" \
2929
MONGODB_INDEX="vector_index" \

0 commit comments

Comments
 (0)