mirror of
https://github.com/langgenius/dify.git
synced 2026-06-15 14:05:29 +08:00
bab4975809
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
22 lines
450 B
Python
22 lines
450 B
Python
from pydantic import BaseModel
|
|
|
|
from models.dataset import DocumentSegment
|
|
|
|
|
|
class RetrievalChildChunk(BaseModel):
|
|
"""Retrieval segments."""
|
|
|
|
id: str
|
|
content: str
|
|
score: float
|
|
position: int
|
|
|
|
|
|
class RetrievalSegments(BaseModel):
|
|
"""Retrieval segments."""
|
|
|
|
model_config = {"arbitrary_types_allowed": True}
|
|
segment: DocumentSegment
|
|
child_chunks: list[RetrievalChildChunk] | None = None
|
|
score: float | None = None
|