From ad163eb66597a8f90b6829a456caac1bedf886fa Mon Sep 17 00:00:00 2001 From: "m.dabbagh" Date: Tue, 20 Jan 2026 23:36:02 +0330 Subject: [PATCH] change api defaults --- src/adapters/incoming/api_routes.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/adapters/incoming/api_routes.py b/src/adapters/incoming/api_routes.py index 8391315..1c0eeda 100644 --- a/src/adapters/incoming/api_routes.py +++ b/src/adapters/incoming/api_routes.py @@ -101,7 +101,7 @@ def get_service() -> ITextProcessor: def get_chunking_strategy( strategy_name: ChunkingMethod = Form(..., description="Chunking method"), - chunk_size: int = Form(..., description="Target chunk size in characters", ge=1, le=10000), + chunk_size: int = Form(512, description="Target chunk size in characters", ge=1, le=10000), overlap_size: int = Form(0, description="Overlap between chunks", ge=0), respect_boundaries: bool = Form(True, description="Respect text boundaries"), ) -> ChunkingStrategy: @@ -231,8 +231,8 @@ def to_chunk_responses(chunks: List[Chunk]) -> List[ChunkResponse]: ) async def perform_chunking( file: Optional[UploadFile] = File(None, description="Markdown file (.md) to upload"), - text: Optional[str] = Form(None, description="Markdown text to process", json_schema_extra={"x-textarea": True}), - title: str = Form("markdown_input", description="Optional title for the document"), + text: Optional[str] = Form('', description="Markdown text to process"), + title: Optional[str] = Form('', description="Optional title for the document"), strategy: ChunkingStrategy = Depends(get_chunking_strategy), service: ITextProcessor = Depends(get_service), ) -> ChunkListResponse: