Documentation Index
Fetch the complete documentation index at: https://morphik.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
def upsert_document_summary(
document_id: str,
content: str,
versioning: bool = True,
overwrite_latest: bool = False,
) -> Summary
async def upsert_document_summary(
document_id: str,
content: str,
versioning: bool = True,
overwrite_latest: bool = False,
) -> Summary
Parameters
document_id (str): ID of the document
content (str): Summary content (markdown or plain text)
versioning (bool, optional): Create a new version instead of overwriting. Defaults to True.
overwrite_latest (bool, optional): Overwrite the latest summary when versioning is enabled. Defaults to False.
Returns
Summary: Updated summary payload
Examples
from morphik import Morphik
db = Morphik()
summary = db.upsert_document_summary(
document_id="doc_123",
content="This report summarizes Q2 performance.",
)
print(summary.version)
from morphik import AsyncMorphik
async with AsyncMorphik() as db:
summary = await db.upsert_document_summary(
document_id="doc_123",
content="This report summarizes Q2 performance.",
)
print(summary.version)