Interface ImportResult

Summary of a completed import, as Memory.importFrom() and Memory.importFromString() return it.

interface ImportResult {
    imported: number;
    skipped: number;
    errors: string[];
}

Properties

imported: number

How many traces the import wrote, and, from a JSON file, its knowledge nodes and edges, documents, chunks, images, conversations and messages too; from a SQLite file, its knowledge nodes and edges too. A JSON file's brain metadata, the knowledge nodes and edge an Obsidian note's wikilink adds, and the conversations row of each conversation in a ChatGPT export are written and not counted.

skipped: number

How many records the import did not write: a duplicate trace (see ImportOptions.dedup), a graph, document, chunk, image, conversation or message row the brain holds already, a Markdown or Obsidian note whose body is blank, a CSV row whose content is blank, a memory-graph node whose trace the import did not write under its id and an edge that names one, and a row that lacks a field it needs, such as an edge with no source or target.

errors: string[]

Human-readable messages for the records that failed to import, for an Obsidian note's link or tag the import could not write, for a source that could not be read or parsed, and for a source, or a Markdown or Obsidian note, that the brain's scope-id form refuses (the message names scope_id_form).