feat: pin new version of jobkit with granite-docling and connectors (#391)

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
This commit is contained in:
Michele Dolfi
2025-10-03 14:24:51 +02:00
committed by GitHub
parent f6b5f0e063
commit 0595d31d5b
4 changed files with 1202 additions and 1177 deletions

View File

@@ -46,7 +46,6 @@ from docling_jobkit.datamodel.s3_coords import S3Coordinates
from docling_jobkit.datamodel.task import Task, TaskSource, TaskType
from docling_jobkit.datamodel.task_targets import (
InBodyTarget,
TaskTarget,
ZipTarget,
)
from docling_jobkit.orchestrators.base_orchestrator import (
@@ -64,6 +63,7 @@ from docling_serve.datamodel.requests import (
HttpSourceRequest,
S3SourceRequest,
TargetName,
TargetRequest,
make_request_model,
)
from docling_serve.datamodel.responses import (
@@ -304,7 +304,7 @@ def create_app(): # noqa: C901
convert_options: ConvertDocumentsRequestOptions,
chunking_options: BaseChunkerOptions | None,
chunking_export_options: ChunkingExportOptions | None,
target: TaskTarget,
target: TargetRequest,
) -> Task:
_log.info(f"Received {len(files)} files for processing.")

View File

@@ -13,8 +13,8 @@ from docling_jobkit.datamodel.http_inputs import FileSource, HttpSource
from docling_jobkit.datamodel.s3_coords import S3Coordinates
from docling_jobkit.datamodel.task_targets import (
InBodyTarget,
PutTarget,
S3Target,
TaskTarget,
ZipTarget,
)
@@ -47,12 +47,17 @@ SourceRequestItem = Annotated[
FileSourceRequest | HttpSourceRequest | S3SourceRequest, Field(discriminator="kind")
]
TargetRequest = Annotated[
InBodyTarget | ZipTarget | S3Target | PutTarget,
Field(discriminator="kind"),
]
## Complete Source request
class ConvertDocumentsRequest(BaseModel):
options: ConvertDocumentsRequestOptions = ConvertDocumentsRequestOptions()
sources: list[SourceRequestItem]
target: TaskTarget = InBodyTarget()
target: TargetRequest = InBodyTarget()
@model_validator(mode="after")
def validate_s3_source_and_target(self) -> Self:
@@ -94,7 +99,7 @@ class BaseChunkDocumentsRequest(BaseModel):
),
] = False
target: Annotated[
TaskTarget, Field(description="Specification for the type of output target.")
TargetRequest, Field(description="Specification for the type of output target.")
] = InBodyTarget()