Class: ChatGptImporter
Defined in: packages/agentos/src/memory/io/ChatGptImporter.ts:95
Imports a ChatGPT conversations.json export into a SqliteBrain.
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/memory/io/ChatGptImporter.ts:99
Parameters
brain
The target SqliteBrain to import into.
Returns
ChatGptImporter
Methods
import()
import(
sourcePath):Promise<ImportResult>
Defined in: packages/agentos/src/memory/io/ChatGptImporter.ts:112
Parse conversations.json and import all conversations and message pairs.
Parameters
sourcePath
string
Absolute path to the ChatGPT conversations.json file.
Returns
Promise<ImportResult>
ImportResult with counts of imported traces, skipped duplicates,
and any per-item error messages.