feat(backend): 文件处理和语义分割 API 更新
- chunks API: 支持语义分割模式和 embedding 配置 - files API: 文件异步处理优化 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -17,7 +17,7 @@ from app.core.crud import CRUDBase
|
||||
from app.core.logging import log_success, log_failure
|
||||
from app.models.models import Chunk, File
|
||||
from app.schemas.chunk import ChunkResponse
|
||||
from app.schemas.chunk import ChunkCreateSchema
|
||||
from app.schemas.chunk import ChunkCreateSchema, ChunkUpdateSchema
|
||||
from app.services.text_splitter.splitter import get_splitter
|
||||
from markitdown import MarkItDown
|
||||
|
||||
@@ -209,7 +209,7 @@ async def list_chunks(
|
||||
limit=page_size,
|
||||
filters=filters,
|
||||
order_by="created_at",
|
||||
descending=True
|
||||
descending=False
|
||||
)
|
||||
|
||||
chunk_responses = [ChunkResponse.model_validate(c) for c in chunks]
|
||||
@@ -239,7 +239,7 @@ async def get_chunk(
|
||||
async def update_chunk(
|
||||
project_id: UUID,
|
||||
chunk_id: UUID,
|
||||
chunk: ChunkCreateSchema,
|
||||
chunk: ChunkUpdateSchema,
|
||||
db: AsyncSession = Depends(get_db)
|
||||
):
|
||||
"""Update chunk"""
|
||||
|
||||
Reference in New Issue
Block a user