Class: ChatGptImporter
Defined in: packages/agentos/src/cognition/memory/io/ChatGptImporter.ts:94
Imports a ChatGPT conversations.json export into a Brain.
Usage:
const importer = new ChatGptImporter(brain);
const result = await importer.import('/path/to/conversations.json');
Constructors
Constructor
new ChatGptImporter(
brain):ChatGptImporter
Defined in: packages/agentos/src/cognition/memory/io/ChatGptImporter.ts:98
Parameters
brain
The target Brain to import into.
Returns
ChatGptImporter
Methods
import()
import(
sourcePath,options?):Promise<ImportResult>
Defined in: packages/agentos/src/cognition/memory/io/ChatGptImporter.ts:111
Parse conversations.json and import all conversations and message pairs.
Parameters
sourcePath
string
Absolute path to the ChatGPT conversations.json file.
options?
Pick<ImportOptions, "dedup">
Returns
Promise<ImportResult>
ImportResult with counts of imported traces, skipped duplicates,
and any per-item error messages.