mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-06 11:37:12 +00:00
parent
d775ddd749
commit
d2f9288be6
@ -1,7 +1,7 @@
|
|||||||
"""Interface for interacting with a document."""
|
"""Interface for interacting with a document."""
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
|
|
||||||
class Document(BaseModel):
|
class Document(BaseModel):
|
||||||
@ -10,6 +10,7 @@ class Document(BaseModel):
|
|||||||
page_content: str
|
page_content: str
|
||||||
lookup_str: str = ""
|
lookup_str: str = ""
|
||||||
lookup_index = 0
|
lookup_index = 0
|
||||||
|
metadata: dict = Field(default_factory=dict)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def paragraphs(self) -> List[str]:
|
def paragraphs(self) -> List[str]:
|
||||||
|
Loading…
Reference in New Issue
Block a user