Python SDK
Add Memories
Add Memories
Before adding memories, make sure to configure the API key in your environment.
You can add memories to a graph by using the add
method. Add currently supports:
- Raw Text: chunking will be handled automatically;
- PDFs: parsing and chunking will be handled automatically;
- …and more coming soon!
Adding text
The graph_id
parameter is optional. If not set, it defaults to the default
graph.
Adding PDFs
Metadata
You can also specify metadata
to pass a dictionary of information that will be tied to the memory you’re creating.
For example, this can be the document URL that can be used, at query time, to reference the sources used to produce an answer.