before_rabbithole_insert_memory
Intervene before the RabbitHole insert a Document
in the declarative memory.
Allows editing and enhancing a single Document
before the RabbitHole add it to the declarative vector memory.
Example of the Langchain document:
đ Arguments
Name | Type | Description |
---|---|---|
doc |
Document |
Langchain Document to be inserted in memory. |
cat |
StrayCat | Cheshire Cat instance, allows you to use the framework components. |
The Document
has two properties:
page_content
: the string with the text to save in memory;metadata
: a dictionary with at least two keys:source
: where the text comes from;when
: timestamp to track when it's been uploaded.
Info
Before adding the doc
, the Cat will add source
and when
metadata with the file name and ingestion time.
âŠī¸ Return
Type: Document
Langchain Document
that is added in the declarative vector memory.