Skip to content

armgit / camel

Public Imported from GitHub
0

๐Ÿซ CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org

fix: update Chunkr integration by Chunkr SDK. (#1779)

sgw714d849d659c
diff --git a/camel/loaders/__init__.py b/camel/loaders/__init__.py
index 880a2e092..3017ded20 100644
--- a/camel/loaders/__init__.py
+++ b/camel/loaders/__init__.py
@@ -14,7 +14,7 @@
from .apify_reader import Apify
from .base_io import File, create_file, create_file_from_raw_bytes
-from .chunkr_reader import ChunkrReader
+from .chunkr_reader import ChunkrReader, ChunkrReaderConfig
from .crawl4ai_reader import Crawl4AI
from .firecrawl_reader import Firecrawl
from .jina_url_reader import JinaURLReader
@@ -33,7 +33,7 @@ __all__ = [
'Firecrawl',
'Apify',
'ChunkrReader',
- 'PandasReader',
+ 'ChunkrReaderConfig',
'MinerU',
'Crawl4AI',
'MarkItDownLoader',
diff --git a/camel/loaders/chunkr_reader.py b/camel/loaders/chunkr_reader.py
index 007ee0764..f827beb3f 100644
--- a/camel/loaders/chunkr_reader.py
+++ b/camel/loaders/chunkr_reader.py
@@ -15,16 +15,43 @@
import json
import logging
import os
-import time
-from typing import IO, Any, Optional, Union
+from typing import Optional
-import requests
+from chunkr_ai import Chunkr
+from chunkr_ai.models import (
+ ChunkProcessing,
+ Configuration,
+ OcrStrategy,
+ Status,
+)
from camel.utils import api_keys_required
logger = logging.getLogger(__name__)
+class ChunkrReaderConfig:
+ r"""Defines the parameters for configuring the task.
+
+ Args:
+ chunk_processing (int, optional): The target chunk length.
+ (default: :obj:`512`)
+ high_resolution (bool, optional): Whether to use high resolution OCR.
+ (default: :obj:`True`)
+ ocr_strategy (str, optional): The OCR strategy. Defaults to 'Auto'.
+ """
+
+ def __init__(
+ self,
+ chunk_processing: int = 512,
+ high_resolution: bool = True,
+ ocr_strategy: str = "Auto",
+ ):
+ self.chunk_processing = chunk_processing
+ self.high_resolution = high_resolution
+ self.ocr_strategy = ocr_strategy
+
+
class ChunkrReader:
r"""Chunkr Reader for processing documents and returning content
in various formats.
@@ -35,8 +62,6 @@ class ChunkrReader:
`CHUNKR_API_KEY`. (default: :obj:`None`)
url (Optional[str], optional): The url to the Chunkr service.
(default: :obj:`https://api.chunkr.ai/api/v1/task`)
- timeout (int, optional): The maximum time in seconds to wait for the
- API responses. (default: :obj:`30`)
**kwargs (Any): Additional keyword arguments for request headers.
"""
@@ -49,111 +74,76 @@ class ChunkrReader:
self,
api_key: Optional[str] = None,
url: Optional[str] = "https://api.chunkr.ai/api/v1/task",
- timeout: int = 30,
- **kwargs: Any,
) -> None:
self._api_key = api_key or os.getenv('CHUNKR_API_KEY')
- self._url = os.getenv('CHUNKR_API_URL') or url
- self._headers = {
- "Authorization": f"{self._api_key}",
- **kwargs,
- }
- self.timeout = timeout
-
- def submit_task(
+ self._chunkr = Chunkr(api_key=self._api_key)
+
+ async def submit_task(
self,
file_path: str,
- model: str = "Fast",
- ocr_strategy: str = "Auto",
- target_chunk_length: str = "512",
+ chunkr_config: Optional[ChunkrReaderConfig] = None,
) -> str:
r"""Submits a file to the Chunkr API and returns the task ID.
Args:
file_path (str): The path to the file to be uploaded.
- model (str, optional): The model to be used for the task.
- (default: :obj:`Fast`)
- ocr_strategy (str, optional): The OCR strategy. Defaults to 'Auto'.
- target_chunk_length (str, optional): The target chunk length.
- (default: :obj:`512`)
+ chunkr_config (ChunkrReaderConfig, optional): The configuration
+ for the Chunkr API. Defaults to None.
Returns:
str: The task ID.
"""
- with open(file_path, 'rb') as file:
- files: dict[
- str, Union[tuple[None, IO[bytes]], tuple[None, str]]
- ] = {
- 'file': (
- None,
- file,
- ), # Properly pass the file as a binary stream
- 'model': (None, model),
- 'ocr_strategy': (None, ocr_strategy),
- 'target_chunk_length': (None, target_chunk_length),
- }
- try:
- response = requests.post(
- self._url, # type: ignore[arg-type]
- headers=self._headers,
- files=files,
- timeout=self.timeout,
- )
- response.raise_for_status()
- task_id = response.json().get('task_id')
- if not task_id:
- raise ValueError("Task ID not returned in the response.")
- logger.info(f"Task submitted successfully. Task ID: {task_id}")
- return task_id
- except Exception as e:
- logger.error(f"Failed to submit task: {e}")
- raise ValueError(f"Failed to submit task: {e}") from e
-
- def get_task_output(self, task_id: str, max_retries: int = 5) -> str:
+ chunkr_config = self._to_chunkr_configuration(
+ chunkr_config or ChunkrReaderConfig()
+ )
+
+ try:
+ task = await self._chunkr.create_task(
+ file=file_path, config=chunkr_config
+ )
+ logger.info(
+ f"Task submitted successfully. Task ID: {task.task_id}"
+ )
+ return task.task_id
+ except Exception as e:
+ logger.error(f"Failed to submit task: {e}")
+ raise ValueError(f"Failed to submit task: {e}") from e
+
+ async def get_task_output(self, task_id: str) -> str | None:
r"""Polls the Chunkr API to check the task status and returns the task
result.
Args:
task_id (str): The task ID to check the status for.
- max_retries (int, optional): Maximum number of retry attempts.
- (default: :obj:`5`)
Returns:
- str: The formatted task result in JSON format.
-
- Raises:
- ValueError: If the task status cannot be retrieved.
- RuntimeError: If the maximum number of retries is reached without
- a successful task completion.
+ Optional[str]: The formatted task result in JSON format, or `None`
+ if the task fails or is canceld.
"""
- url_get = f"{self._url}/{task_id}"
- attempts = 0
-
- while attempts < max_retries:
- try:
- response = requests.get(
- url_get, headers=self._headers, timeout=self.timeout
+ try:
+ task = await self._chunkr.get_task(task_id)
+ except Exception as e:
+ logger.error(f"Failed to get task by task id: {task_id}: {e}")
+ raise ValueError(
+ f"Failed to get task by task id: {task_id}: {e}"
+ ) from e
+
+ try:
+ await task.poll()
+ if task.status == Status.SUCCEEDED:
+ logger.info(f"Task {task_id} completed successfully.")
+ return self._pretty_print_response(task.json())
+ elif task.status == Status.FAILED:
+ logger.warning(
+ f"Task {task_id} encountered an error: {task.message}"
)
- response.raise_for_status()
- task_status = response.json().get('status')
-
- if task_status == "Succeeded":
- logger.info(f"Task {task_id} completed successfully.")
- return self._pretty_print_response(response.json())
- else:
- logger.info(
- f"Task {task_id} is still {task_status}. Retrying "
- "in 5 seconds..."
- )
- except Exception as e:
- logger.error(f"Failed to retrieve task status: {e}")
- raise ValueError(f"Failed to retrieve task status: {e}") from e
-
- attempts += 1
- time.sleep(5)
-
- logger.error(f"Max retries reached for task {task_id}.")
- raise RuntimeError(f"Max retries reached for task {task_id}.")
+ return None
+ else:
+ logger.warning(f"Task {task_id} was manually cancelled.")
+ return None
+ except Exception as e:
+ logger.error(f"Failed to retrieve task status: {e}")
+ raise ValueError(f"Failed to retrieve task status: {e}") from e
def _pretty_print_response(self, response_json: dict) -> str:
r"""Pretty prints the JSON response.
@@ -164,4 +154,36 @@ class ChunkrReader:
Returns:
str: Formatted JSON as a string.
"""
+ from datetime import datetime
+
+ return json.dumps(
+ response_json,
+ default=lambda o: o.isoformat()
+ if isinstance(o, datetime)
+ else None,
+ indent=4,
+ )
+
+ def _to_chunkr_configuration(
+ self, chunkr_config: ChunkrReaderConfig
+ ) -> Configuration:
+ r"""Converts the ChunkrReaderConfig to Chunkr Configuration.
+
+ Args:
+ chunkr_config (ChunkrReaderConfig):
+ The ChunkrReaderConfig to convert.
+
+ Returns:
+ Configuration: Chunkr SDK configuration.
+ """
+ return Configuration(
+ chunk_processing=ChunkProcessing(
+ target_length=chunkr_config.chunk_processing
+ ),
+ high_resolution=chunkr_config.high_resolution,
+ ocr_strategy={
+ "Auto": OcrStrategy.AUTO,
+ "All": OcrStrategy.ALL,
+ }.get(chunkr_config.ocr_strategy, OcrStrategy.ALL),
+ )
return json.dumps(response_json, indent=4, ensure_ascii=False)
diff --git a/docs/cookbooks/data_processing/agent_with_chunkr_for_pdf_parsing.ipynb b/docs/cookbooks/data_processing/agent_with_chunkr_for_pdf_parsing.ipynb
index bce415d1a..13283300c 100644
--- a/docs/cookbooks/data_processing/agent_with_chunkr_for_pdf_parsing.ipynb
+++ b/docs/cookbooks/data_processing/agent_with_chunkr_for_pdf_parsing.ipynb
@@ -155,7 +155,7 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 3,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
@@ -163,15 +163,7 @@
"id": "cuZwSWBYyCT8",
"outputId": "684ab262-75aa-41af-a460-0d8e67316022"
},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Enter your API key: ยทยทยทยทยทยทยทยทยทยท\n"
- ]
- }
- ],
+ "outputs": [],
"source": [
"import os\n",
"from getpass import getpass\n",
@@ -216,7 +208,7 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 1,
"metadata": {
"id": "dUVE7z9hwEV7"
},
@@ -253,25 +245,13 @@
"id": "SgIsQpOX82Bo",
"outputId": "fe7849a7-4980-421a-9f84-af4c36a37ff4"
},
- "outputs": [
- {
- "data": {
- "application/vnd.google.colaboratory.intrinsic+json": {
- "type": "string"
- },
- "text/plain": [
- "'0396e0fd-e437-4ec4-b4b9-979b6f4c83fb'"
- ]
- },
- "execution_count": 5,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
+ "outputs": [],
"source": [
"# Importing the ChunkrReader class from the camel.loaders module\n",
"# This class handles document processing using Chunkr's capabilities\n",
"from camel.loaders import ChunkrReader\n",
+ "import nest_asyncio\n",
+ "nest_asyncio.apply() \n",
"\n",
"# Initializing an instance of ChunkrReader\n",
"# This object will be used to submit tasks and manage document processing\n",
@@ -279,7 +259,7 @@
"\n",
"# Submitting a document processing task\n",
"# Replace \"local_data/example.pdf\" with the path to your target document\n",
- "chunkr_reader.submit_task(file_path=\"local_data/camel_paper.pdf\")"
+ "await chunkr_reader.submit_task(file_path=\"local_data/camel_paper.pdf\")"
]
},
{
@@ -314,8 +294,7 @@
"outputs": [],
"source": [
"# Retrieving the output of a previously submitted task\n",
- "# The \"max_retries\" parameter determines the number of times to retry if the task output is not immediately available\n",
- "chunkr_output = chunkr_reader.get_task_output(task_id=\"902e686a-d6f5-413d-8a8d-241a3f43d35b\", max_retries=10)\n",
+ "chunkr_output = await chunkr_reader.get_task_output(task_id=\"902e686a-d6f5-413d-8a8d-241a3f43d35b\")\n",
"print(chunkr_output)"
]
},
@@ -509,7 +488,7 @@
"provenance": []
},
"kernelspec": {
- "display_name": "camel-ai-r_m-dpnI-py3.11",
+ "display_name": "camel",
"language": "python",
"name": "python3"
},
@@ -523,7 +502,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.11.5"
+ "version": "3.12.8"
}
},
"nbformat": 4,
diff --git a/examples/loaders/chunkr_example.py b/examples/loaders/chunkr_example.py
index dcf826491..cdccf97f3 100644
--- a/examples/loaders/chunkr_example.py
+++ b/examples/loaders/chunkr_example.py
@@ -12,40 +12,66 @@
# limitations under the License.
# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========
-from camel.loaders import ChunkrReader
+import asyncio
+
+from camel.loaders import ChunkrReader, ChunkrReaderConfig
+
+
+async def process_file(
+ chunkr: ChunkrReader,
+ file_path: str,
+ chunk_config: ChunkrReaderConfig = None,
+) -> str:
+ try:
+ task_id = await chunkr.submit_task(
+ file_path,
+ chunkr_config=chunk_config,
+ )
+ result = await chunkr.get_task_output(task_id)
+ return result
+ except Exception as e:
+ print(f"Error processing file {file_path}: {e}")
def read_with_different_model():
r"""Reads a document using the Chunkr API."""
- print("Choose a model for processing the file:")
- print("1. Fast")
- print("2. HighQuality")
+
+ chunk_config = ChunkrReaderConfig()
+
+ print("Whether to use high-resolution images for processing the file:")
+ print("1. Yes")
+ print("2. No")
choice = input("Enter your choice (1-2): ")
- models = {"1": "Fast", "2": "HighQuality"}
+ high_resolution_strategies = {"1": "Yes", "2": "No"}
- if choice not in models:
+ if choice not in high_resolution_strategies:
print("Invalid choice. Exiting.")
return
- model = models[choice]
+ is_high_resolution = high_resolution_strategies[choice]
+ chunk_config.high_resolution = is_high_resolution == "Yes"
print("Choose an OCR strategy:")
print("1. Auto")
print("2. All")
- print("3. Off")
- ocr_choice = input("Enter your choice (1-3) [Default: Auto]: ")
- ocr_strategies = {"1": "Auto", "2": "All", "3": "Off"}
+ ocr_choice = input("Enter your choice (1-2) [Default: All]: ")
+ ocr_strategies = {"1": "Auto", "2": "All"}
if ocr_choice not in ocr_strategies:
- ocr_strategy = "Auto"
+ chunk_config.ocr_strategy = "All"
else:
- ocr_strategy = ocr_strategies[ocr_choice]
+ chunk_config.ocr_strategy = ocr_strategies[ocr_choice]
while True:
target_chunk_length = (
- input("Enter the target chunk length [Default: 512]: ") or "512"
+ input(
+ "Enter The target number of words in each chunk."
+ "[Default: 512]: "
+ )
+ or "512"
)
if target_chunk_length.isdigit() and int(target_chunk_length) > 0:
+ chunk_config.chunk_processing = int(target_chunk_length)
break
else:
print("Invalid input. Please enter a valid positive integer.")
@@ -55,16 +81,10 @@ def read_with_different_model():
chunkr_reader = ChunkrReader()
try:
- task_id = chunkr_reader.submit_task(
- file_path,
- model=model,
- ocr_strategy=ocr_strategy,
- target_chunk_length=target_chunk_length,
+ result = asyncio.run(
+ process_file(chunkr_reader, file_path, chunk_config)
)
-
- result = chunkr_reader.get_task_output(task_id)
print(result)
-
except Exception as e:
print(f"An error occurred: {e}")
diff --git a/pyproject.toml b/pyproject.toml
index 70a383740..d28fe4a74 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -30,6 +30,8 @@ dependencies = [
"pydantic>=2.10.6",
"httpx>=0.28.0,<1.0.0dev",
"psutil>=5.9.8,<6",
+ "pyyaml>=6.0.2,<7",
+ "chunkr-ai>=0.0.41",
"pillow>=10.1.0,<11.0.0",
]
diff --git a/test/loaders/test_chunkr_reader.py b/test/loaders/test_chunkr_reader.py
index 44d455147..357cf35e2 100644
--- a/test/loaders/test_chunkr_reader.py
+++ b/test/loaders/test_chunkr_reader.py
@@ -12,75 +12,113 @@
# limitations under the License.
# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========
+import json
import unittest
-from unittest.mock import mock_open, patch
+from unittest.mock import AsyncMock, patch
-from camel.loaders import ChunkrReader
+from chunkr_ai.models import Status
+
+from camel.loaders import ChunkrReader, ChunkrReaderConfig
class TestChunkrReader(unittest.TestCase):
- @patch('requests.post')
- @patch(
- 'builtins.open', new_callable=mock_open, read_data='fake file content'
- )
- def test_submit_task_success(self, mock_file, mock_post):
- mock_post.return_value.ok = True
- mock_post.return_value.json.return_value = {'task_id': '12345'}
-
- reader = ChunkrReader(api_key='test_api_key')
- task_id = reader.submit_task('fake_path.txt')
-
- self.assertEqual(task_id, '12345')
- mock_post.assert_called_once()
- mock_file.assert_called_once_with('fake_path.txt', 'rb')
-
- @patch('requests.post')
- @patch(
- 'builtins.open', new_callable=mock_open, read_data='fake file content'
- )
- def test_submit_task_no_task_id(self, mock_file, mock_post):
- mock_post.return_value.ok = True
- mock_post.return_value.json.return_value = {}
-
- reader = ChunkrReader(api_key='test_api_key')
+ def setUp(self):
+ with patch('chunkr_ai.Chunkr'):
+ self.reader = ChunkrReader(api_key="fake_api_key")
+
+ @patch('chunkr_ai.Chunkr')
+ async def test_submit_task_success(self, mock_chunkr_class):
+ mock_chunkr_instance = mock_chunkr_class.return_value
+ mock_task = AsyncMock()
+ mock_task.task_id = "12345"
+ mock_chunkr_instance.create_task = AsyncMock(return_value=mock_task)
+
+ task_id = await self.reader.submit_task("fake_path.pdf")
+
+ self.assertEqual(task_id, "12345")
+ mock_chunkr_instance.create_task.assert_called_once()
+
+ @patch('chunkr_ai.Chunkr')
+ async def test_submit_task_with_config(self, mock_chunkr_class):
+ mock_chunkr_instance = mock_chunkr_class.return_value
+ mock_task = AsyncMock()
+ mock_task.task_id = "12345"
+ mock_chunkr_instance.create_task = AsyncMock(return_value=mock_task)
+
+ config = ChunkrReaderConfig()
+ config.chunk_processing = 1024
+
+ task_id = await self.reader.submit_task("fake_path.pdf", config)
+
+ self.assertEqual(task_id, "12345")
+ mock_chunkr_instance.create_task.assert_called_once()
+
+ @patch('chunkr_ai.Chunkr')
+ async def test_submit_task_failure(self, mock_chunkr_class):
+ mock_chunkr_instance = mock_chunkr_class.return_value
+ mock_chunkr_instance.create_task = AsyncMock(side_effect=Exception())
with self.assertRaises(ValueError) as context:
- reader.submit_task('fake_path.txt')
-
- self.assertEqual(
- str(context.exception),
- "Failed to submit task: Task ID not returned in the response.",
- )
-
- @patch('requests.get')
- def test_get_task_output_success(self, mock_get):
- mock_get.return_value.ok = True
- mock_get.return_value.json.return_value = {
- 'status': 'Succeeded',
- 'result': 'Some result',
- }
-
- reader = ChunkrReader(api_key='test_api_key')
- result = reader.get_task_output('12345')
-
- self.assertIn('result', result)
- mock_get.assert_called_once_with(
- 'https://api.chunkr.ai/api/v1/task/12345',
- headers=reader._headers,
- timeout=reader.timeout,
- )
-
- @patch('requests.get')
- def test_get_task_output_max_retries(self, mock_get):
- mock_get.return_value.ok = True
- mock_get.return_value.json.return_value = {'status': 'Pending'}
-
- reader = ChunkrReader(api_key='test_api_key')
-
- with self.assertRaises(RuntimeError) as context:
- reader.get_task_output('12345', max_retries=2)
-
- self.assertEqual(
- str(context.exception), "Max retries reached for task 12345."
- )
- self.assertEqual(mock_get.call_count, 2)
+ await self.reader.submit_task("fake_path.pdf")
+
+ self.assertIn("Failed to submit task", str(context.exception))
+ mock_chunkr_instance.create_task.assert_called_once()
+
+ @patch('chunkr_ai.Chunkr')
+ async def test_get_task_output_success(self, mock_chunkr_class):
+ mock_chunkr_instance = mock_chunkr_class.return_value
+ mock_task = AsyncMock()
+ mock_task.status = Status.SUCCEEDED
+ mock_task.json.return_value = {"status": "Succeeded"}
+ mock_task.poll = AsyncMock()
+ mock_chunkr_instance.get_task = AsyncMock(return_value=mock_task)
+
+ result = await self.reader.get_task_output("test_task_id")
+
+ expected_result = json.dumps({"status": "Succeeded"}, indent=4)
+ self.assertEqual(result, expected_result)
+ mock_chunkr_instance.get_task.assert_called_once_with("test_task_id")
+ mock_task.poll.assert_called_once()
+
+ @patch('chunkr_ai.Chunkr')
+ async def test_get_task_output_failed(self, mock_chunkr_class):
+ mock_chunkr_instance = mock_chunkr_class.return_value
+ mock_task = AsyncMock()
+ mock_task.status = Status.FAILED
+ mock_task.poll = AsyncMock()
+ mock_chunkr_instance.get_task = AsyncMock(return_value=mock_task)
+
+ result = await self.reader.get_task_output("test_task_id")
+
+ self.assertEqual(result, None)
+ mock_chunkr_instance.get_task.assert_called_once_with("test_task_id")
+ mock_task.poll.assert_called_once()
+
+ @patch('chunkr_ai.Chunkr')
+ async def test_get_task_output_get_task_error(self, mock_chunkr_class):
+ mock_chunkr_instance = mock_chunkr_class.return_value
+ mock_chunkr_instance.get_task = AsyncMock(side_effect=Exception())
+
+ with self.assertRaises(ValueError) as context:
+ await self.reader.get_task_output("test_task_id")
+
+ self.assertIn("Failed to get task by task id", str(context.exception))
+ mock_chunkr_instance.get_task.assert_called_once_with("test_task_id")
+
+ @patch('chunkr_ai.Chunkr')
+ async def test_get_task_output_poll_error(self, mock_chunkr_class):
+ mock_chunkr_instance = mock_chunkr_class.return_value
+ mock_task = AsyncMock()
+ mock_task.poll = AsyncMock(side_effect=Exception())
+ mock_chunkr_instance.get_task = AsyncMock(return_value=mock_task)
+
+ with self.assertRaises(ValueError) as context:
+ await self.reader.get_task_output("test_task_id")
+
+ self.assertIn("Failed to retrieve task status", str(context.exception))
+ mock_chunkr_instance.get_task.assert_called_once_with("test_task_id")
+ mock_task.poll.assert_called_once()
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/uv.lock b/uv.lock
index ba86538c0..7a24d3f01 100644
--- a/uv.lock
+++ b/uv.lock
@@ -562,6 +562,7 @@ name = "camel-ai"
version = "0.2.61"
source = { editable = "." }
dependencies = [
+ { name = "chunkr-ai" },
{ name = "colorama" },
{ name = "docstring-parser" },
{ name = "httpx" },
@@ -940,7 +941,6 @@ requires-dist = [
{ name = "beautifulsoup4", marker = "extra == 'web-tools'", specifier = ">=4,<5" },
{ name = "botocore", marker = "extra == 'all'", specifier = ">=1.35.3,<2" },
{ name = "botocore", marker = "extra == 'storage'", specifier = ">=1.35.3,<2" },
- { name = "chunkr-ai", marker = "extra == 'owl'", specifier = ">=0.0.41" },
{ name = "cohere", marker = "extra == 'all'", specifier = ">=5.11.0,<6" },
{ name = "cohere", marker = "extra == 'model-platforms'", specifier = ">=5.11.0,<6" },
{ name = "cohere", marker = "extra == 'rag'", specifier = ">=5.11.0,<6" },
@@ -1368,6 +1368,22 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/37/ca/57d7647caf903ff465b5af4e6e1ea75dc2f42b2b0684487e02161706773b/chunkr_ai-0.0.50-py3-none-any.whl", hash = "sha256:3a8652cf16a3fd9d1f51d8a922dfc91984e2befab32a6faaaa28dae7dcb6324d", size = 16751 },
]
+[[package]]
+name = "chunkr-ai"
+version = "0.0.41"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+ { name = "httpx" },
+ { name = "nest-asyncio" },
+ { name = "pillow" },
+ { name = "pydantic" },
+ { name = "python-dotenv" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/bc/67/37c9f1798e884f12ef0e2a25456536d373c1e72c399ddd9cba47057e79c9/chunkr_ai-0.0.41.tar.gz", hash = "sha256:5781276e70ab50ae5f7eb85707432b1d790acf82d59a83060643915870dd1ff6", size = 14908 }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/c6/1d/355a7cdda41ad5fb8a9d9345e586c02491db30d004deccba8a0613406e66/chunkr_ai-0.0.41-py3-none-any.whl", hash = "sha256:7f83c15ae0bad1e37aa4ac880da747667b0b7a08420755e28f4a2f220ed4eb57", size = 14502 },
+]
+
[[package]]
name = "click"
version = "8.2.1"