mirror of
https://github.com/langgenius/dify.git
synced 2025-07-23 09:32:36 +00:00
17 lines
371 B
Python
17 lines
371 B
Python
from typing import Optional
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class Document(BaseModel):
|
|
"""Class for storing a piece of text and associated metadata."""
|
|
|
|
page_content: str
|
|
|
|
"""Arbitrary metadata about the page content (e.g., source, relationships to other
|
|
documents, etc.).
|
|
"""
|
|
metadata: Optional[dict] = Field(default_factory=dict)
|
|
|
|
|