feat: Adds tests for pgvector, qdrant and weaviate
This commit is contained in:
parent
0441e19bc9
commit
4035302dd4
3 changed files with 12 additions and 0 deletions
|
|
@ -3,6 +3,7 @@ import logging
|
||||||
import pathlib
|
import pathlib
|
||||||
import cognee
|
import cognee
|
||||||
from cognee.api.v1.search import SearchType
|
from cognee.api.v1.search import SearchType
|
||||||
|
from cognee.modules.retrieval.brute_force_triplet_search import brute_force_triplet_search
|
||||||
|
|
||||||
logging.basicConfig(level=logging.DEBUG)
|
logging.basicConfig(level=logging.DEBUG)
|
||||||
|
|
||||||
|
|
@ -89,6 +90,9 @@ async def main():
|
||||||
history = await cognee.get_search_history()
|
history = await cognee.get_search_history()
|
||||||
assert len(history) == 6, "Search history is not correct."
|
assert len(history) == 6, "Search history is not correct."
|
||||||
|
|
||||||
|
results = await brute_force_triplet_search('Who has the most experience with graphic design?')
|
||||||
|
assert len(results) > 0
|
||||||
|
|
||||||
await cognee.prune.prune_data()
|
await cognee.prune.prune_data()
|
||||||
assert not os.path.isdir(data_directory_path), "Local data files are not deleted"
|
assert not os.path.isdir(data_directory_path), "Local data files are not deleted"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import logging
|
||||||
import pathlib
|
import pathlib
|
||||||
import cognee
|
import cognee
|
||||||
from cognee.api.v1.search import SearchType
|
from cognee.api.v1.search import SearchType
|
||||||
|
from cognee.modules.retrieval.brute_force_triplet_search import brute_force_triplet_search
|
||||||
|
|
||||||
logging.basicConfig(level=logging.DEBUG)
|
logging.basicConfig(level=logging.DEBUG)
|
||||||
|
|
||||||
|
|
@ -61,6 +62,9 @@ async def main():
|
||||||
history = await cognee.get_search_history()
|
history = await cognee.get_search_history()
|
||||||
assert len(history) == 6, "Search history is not correct."
|
assert len(history) == 6, "Search history is not correct."
|
||||||
|
|
||||||
|
results = await brute_force_triplet_search('Who has the most experience with graphic design?')
|
||||||
|
assert len(results) > 0
|
||||||
|
|
||||||
await cognee.prune.prune_data()
|
await cognee.prune.prune_data()
|
||||||
assert not os.path.isdir(data_directory_path), "Local data files are not deleted"
|
assert not os.path.isdir(data_directory_path), "Local data files are not deleted"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ import logging
|
||||||
import pathlib
|
import pathlib
|
||||||
import cognee
|
import cognee
|
||||||
from cognee.api.v1.search import SearchType
|
from cognee.api.v1.search import SearchType
|
||||||
|
from cognee.modules.retrieval.brute_force_triplet_search import brute_force_triplet_search
|
||||||
|
|
||||||
logging.basicConfig(level=logging.DEBUG)
|
logging.basicConfig(level=logging.DEBUG)
|
||||||
|
|
||||||
|
|
@ -59,6 +60,9 @@ async def main():
|
||||||
history = await cognee.get_search_history()
|
history = await cognee.get_search_history()
|
||||||
assert len(history) == 6, "Search history is not correct."
|
assert len(history) == 6, "Search history is not correct."
|
||||||
|
|
||||||
|
results = await brute_force_triplet_search('Who has the most experience with graphic design?')
|
||||||
|
assert len(results) > 0
|
||||||
|
|
||||||
await cognee.prune.prune_data()
|
await cognee.prune.prune_data()
|
||||||
assert not os.path.isdir(data_directory_path), "Local data files are not deleted"
|
assert not os.path.isdir(data_directory_path), "Local data files are not deleted"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue