File tree Expand file tree Collapse file tree 3 files changed +11
-8
lines changed
Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -160,10 +160,10 @@ def load(self, domain_name: str):
160160 # if not absolute, it must be in a data folder in the location of
161161 # this file
162162 if not store_path .is_absolute ():
163- store_path = (
164- Path (__file__ ).parent / Path ("data/vector-stores/" ) / store_path
163+ store_path = Path .cwd () / store_path
164+ self .logger .debug (
165+ f"Store path made absolute relative to cwd: { store_path } "
165166 )
166- self .logger .debug (f"Store path made absolute to: { store_path } " )
167167
168168 assert store_path .is_dir ()
169169
Original file line number Diff line number Diff line change 88Author: Ankur Sinha <sanjay DOT ankur AT gmail DOT com>
99"""
1010
11+ import os
1112import unittest
1213
1314import pytest
14- from gen_rag .stores import Vector_Stores
1515from ollama import ResponseError
1616
17+ from gen_rag .stores import Vector_Stores
18+
1719
1820class TestStores (unittest .TestCase ):
1921 """Docstring for TestStores."""
2022
2123 def test_retrieval (self ):
2224 """Test retrieval"""
2325 try :
24- stores = Vector_Stores (vs_config_file = "vector-stores.json" )
26+ vs_config_file = os .environ .get ("NML_AI_VS_CONFIG" , None )
27+ stores = Vector_Stores (vs_config_file = vs_config_file )
2528 stores .setup ()
2629 stores .retrieve ("NeuroML" , "NeuroML community" )
2730 except ResponseError as e :
Original file line number Diff line number Diff line change 66 "vector_stores" : [
77 {
88 "name" : " nml-docs" ,
9- "path" : " rag_pkg/ gen_rag/data/vector-stores/nml-docs_bge-m3.db"
9+ "path" : " gen_rag/data/vector-stores/nml-docs_bge-m3.db"
1010 },
1111 {
1212 "name" : " nml-elife" ,
13- "path" : " nml-elife_bge-m3.db"
13+ "path" : " gen_rag/data/vector-stores/ nml-elife_bge-m3.db"
1414 },
1515 {
1616 "name" : " nml-schema-docs" ,
17- "path" : " rag_pkg/ gen_rag/data/vector-stores/nml-schema-docs_bge-m3.db"
17+ "path" : " gen_rag/data/vector-stores/nml-schema-docs_bge-m3.db"
1818 }
1919 ]
2020 }
You can’t perform that action at this time.
0 commit comments