Skip to content

Commit

Permalink
updated client
Browse files Browse the repository at this point in the history
  • Loading branch information
akhileshsharma99 committed Feb 20, 2025
1 parent 41ac596 commit 9712b15
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion clients/python-client/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "chunkr-ai"
version = "0.0.40"
version = "0.0.41"
authors = [{"name" = "Ishaan Kapoor", "email" = "ishaan@lumina.sh"}]
description = "Python client for Chunkr: open source document intelligence"
readme = "README.md"
Expand Down
1 change: 1 addition & 0 deletions clients/python-client/src/chunkr_ai/api/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ class Model(str, Enum):

class Pipeline(str, Enum):
AZURE = "Azure"
CHUNKR = "Chunkr"

class Configuration(BaseModel):
chunk_processing: Optional[ChunkProcessing] = None
Expand Down
9 changes: 8 additions & 1 deletion clients/python-client/tests/test_chunkr.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,18 @@ async def test_update_task_direct(client, sample_path):
assert task.configuration.segmentation_strategy == SegmentationStrategy.PAGE

@pytest.mark.asyncio
async def test_pipeline_type(client, sample_path):
async def test_pipeline_type_azure(client, sample_path):
response = await client.upload(sample_path, Configuration(pipeline=Pipeline.AZURE))
assert response.task_id is not None
assert response.status == "Succeeded"
assert response.output is not None

@pytest.mark.asyncio
async def test_pipeline_type_azure(client, sample_path):
response = await client.upload(sample_path, Configuration(pipeline=Pipeline.CHUNKR))
assert response.task_id is not None
assert response.status == "Succeeded"
assert response.output is not None

@pytest.mark.asyncio
async def test_client_lifecycle(client, sample_path):
Expand Down

0 comments on commit 9712b15

Please sign in to comment.