Add metadata for simple doc (#2212)

This commit is contained in:
Chris Weaver
2024-08-22 12:30:28 -07:00
committed by GitHub
parent 197b62aed1
commit 99db27d989
17 changed files with 150 additions and 36 deletions

View File

@@ -54,6 +54,7 @@ def translate_doc_response_to_simple_doc(
highlight for highlight in doc.match_highlights if highlight
],
source_type=doc.source_type,
metadata=doc.metadata,
)
for doc in doc_response.top_documents
]

View File

@@ -64,6 +64,7 @@ class SimpleDoc(BaseModel):
blurb: str
match_highlights: list[str]
source_type: DocumentSource
metadata: dict | None
class ChatBasicResponse(BaseModel):