parent
97fe817186
commit
6c4e6bf1d6
119 changed files with 3181 additions and 5892 deletions
16
api/core/rag/models/document.py
Normal file
16
api/core/rag/models/document.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
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)
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue