Combine docstores and vectorstores within a storages component (#72)

This commit is contained in:
Nguyen Trung Duc (john)
2023-11-14 17:50:57 +07:00
committed by GitHub
parent 640962e916
commit b159897ac6
18 changed files with 36 additions and 21 deletions

View File

@@ -7,7 +7,7 @@ from kotaemon.base import BaseComponent
from kotaemon.embeddings import AzureOpenAIEmbeddings
from kotaemon.llms.completions.openai import AzureOpenAI
from kotaemon.pipelines.retrieving import RetrieveDocumentFromVectorStorePipeline
from kotaemon.vectorstores import ChromaVectorStore
from kotaemon.storages import ChromaVectorStore
class Pipeline(BaseComponent):

View File

@@ -1,7 +1,7 @@
import pytest
from kotaemon.base import Document
from kotaemon.docstores import InMemoryDocumentStore
from kotaemon.storages import InMemoryDocumentStore
def test_simple_document_store_base_interfaces(tmp_path):

View File

@@ -6,11 +6,10 @@ import pytest
from openai.resources.embeddings import Embeddings
from kotaemon.base import Document
from kotaemon.docstores import InMemoryDocumentStore
from kotaemon.embeddings.openai import AzureOpenAIEmbeddings
from kotaemon.pipelines.indexing import IndexVectorStoreFromDocumentPipeline
from kotaemon.pipelines.retrieving import RetrieveDocumentFromVectorStorePipeline
from kotaemon.vectorstores import ChromaVectorStore
from kotaemon.storages import ChromaVectorStore, InMemoryDocumentStore
with open(Path(__file__).parent / "resources" / "embedding_openai.json") as f:
openai_embedding = json.load(f)

View File

@@ -5,12 +5,11 @@ import pytest
from openai.resources.embeddings import Embeddings
from kotaemon.base import Document
from kotaemon.docstores import InMemoryDocumentStore
from kotaemon.embeddings.openai import AzureOpenAIEmbeddings
from kotaemon.pipelines.indexing import IndexVectorStoreFromDocumentPipeline
from kotaemon.pipelines.retrieving import RetrieveDocumentFromVectorStorePipeline
from kotaemon.pipelines.tools import ComponentTool, GoogleSearchTool, WikipediaTool
from kotaemon.vectorstores import ChromaVectorStore
from kotaemon.storages import ChromaVectorStore, InMemoryDocumentStore
with open(Path(__file__).parent / "resources" / "embedding_openai.json") as f:
openai_embedding = json.load(f)

View File

@@ -1,7 +1,7 @@
import json
from kotaemon.base import Document
from kotaemon.vectorstores import ChromaVectorStore, InMemoryVectorStore
from kotaemon.storages import ChromaVectorStore, InMemoryVectorStore
class TestChromaVectorStore: