change api defaults
This commit is contained in:
parent
91f8035043
commit
ad163eb665
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user