make default installation faster (#2)

* remove cohere as default

* refractor dependencies

* use llama-index pdf reader as default (pypdf)

* fix some lazy docstring

* update install scripts

* minor fix
This commit is contained in:
ian_Cin
2024-03-21 22:48:20 +07:00
committed by GitHub
parent a8f92b3f9e
commit d22ae88c7a
11 changed files with 30 additions and 33 deletions

View File

@@ -25,7 +25,7 @@ from theflow.utils.modules import import_dotted_string
from kotaemon.base import RetrievedDocument
from kotaemon.indices import VectorIndexing, VectorRetrieval
from kotaemon.indices.ingests import DocumentIngestor
from kotaemon.indices.rankings import BaseReranking, CohereReranking, LLMReranking
from kotaemon.indices.rankings import BaseReranking, LLMReranking
from .base import BaseFileIndexIndexing, BaseFileIndexRetriever
@@ -67,9 +67,7 @@ class DocumentRetrievalPipeline(BaseFileIndexRetriever):
vector_retrieval: VectorRetrieval = VectorRetrieval.withx(
embedding=embeddings.get_default(),
)
reranker: BaseReranking = CohereReranking.withx(
cohere_api_key=getattr(settings, "COHERE_API_KEY", "")
) >> LLMReranking.withx(llm=llms.get_lowest_cost())
reranker: BaseReranking = LLMReranking.withx(llm=llms.get_lowest_cost())
get_extra_table: bool = False
def run(