From 4ab18c71dabdfe13ce3caa21f984f91e857aa634 Mon Sep 17 00:00:00 2001 From: ian Date: Mon, 1 Apr 2024 20:23:11 +0700 Subject: [PATCH] sync with main --- libs/kotaemon/kotaemon/indices/ingests/files.py | 1 - libs/kotaemon/kotaemon/loaders/adobe_loader.py | 2 +- libs/kotaemon/pyproject.toml | 1 + libs/ktem/ktem/reasoning/simple.py | 9 --------- 4 files changed, 2 insertions(+), 11 deletions(-) diff --git a/libs/kotaemon/kotaemon/indices/ingests/files.py b/libs/kotaemon/kotaemon/indices/ingests/files.py index 0225fae7b..75f944e4d 100644 --- a/libs/kotaemon/kotaemon/indices/ingests/files.py +++ b/libs/kotaemon/kotaemon/indices/ingests/files.py @@ -8,7 +8,6 @@ from kotaemon.indices.splitters import BaseSplitter, TokenSplitter from kotaemon.loaders import ( AdobeReader, - AutoReader, DirectoryReader, MathpixPDFReader, OCRReader, diff --git a/libs/kotaemon/kotaemon/loaders/adobe_loader.py b/libs/kotaemon/kotaemon/loaders/adobe_loader.py index d215e17cd..dd8cbc910 100644 --- a/libs/kotaemon/kotaemon/loaders/adobe_loader.py +++ b/libs/kotaemon/kotaemon/loaders/adobe_loader.py @@ -41,7 +41,7 @@ class AdobeReader(BaseReader): ``` Args: endpoint: URL to the Vision Language Model endpoint. If not provided, - will use the default `knowledgehub.loaders.adobe_loader.DEFAULT_VLM_ENDPOINT` + will use the default `kotaemon.loaders.adobe_loader.DEFAULT_VLM_ENDPOINT` max_figures_to_caption: an int decides how many figured will be captioned. The rest will be ignored (are indexed without captions). diff --git a/libs/kotaemon/pyproject.toml b/libs/kotaemon/pyproject.toml index e1e30280d..8bbe090b3 100644 --- a/libs/kotaemon/pyproject.toml +++ b/libs/kotaemon/pyproject.toml @@ -60,6 +60,7 @@ adv = [ "cohere", "elasticsearch", "llama-cpp-python", + "pdfservices-sdk @ git+https://github.com/niallcm/pdfservices-python-sdk.git@bump-and-unfreeze-requirements", ] dev = [ "ipython", diff --git a/libs/ktem/ktem/reasoning/simple.py b/libs/ktem/ktem/reasoning/simple.py index 5b5d18662..9784d01c7 100644 --- a/libs/ktem/ktem/reasoning/simple.py +++ b/libs/ktem/ktem/reasoning/simple.py @@ -165,15 +165,6 @@ def run(self, docs: list[RetrievedDocument]) -> Document: "Answer: " ) -DEFAULT_VLM_ENDPOINT = ( - "{0}/openai/deployments/{1}/chat/completions?api-version={2}".format( - config("AZURE_OPENAI_ENDPOINT", default=""), - "gpt-4-vision", - config("OPENAI_API_VERSION", default=""), - ) -) - - class AnswerWithContextPipeline(BaseComponent): """Answer the question based on the evidence