Ingest Text
Content: Ingest Text
User Intent
Operation
TypeScript (Canonical)
import { Graphlit } from 'graphlit-client';
import { ContentState, ObservableTypes } from 'graphlit-client/dist/generated/graphql-types';
const graphlit = new Graphlit();
// Basic text ingestion (synchronous)
const response = await graphlit.ingestText(
'This is my note about the project meeting. We discussed Q1 goals and timeline.', // text
'Meeting Notes - January 2025', // name
undefined, // textType (optional)
undefined, // uri (optional - for reference)
undefined, // id (optional)
undefined, // identifier (optional)
true, // isSynchronous
undefined, // workflow (optional)
undefined // collections (optional)
);
const contentId = response.ingestText.id;
console.log(`Text ingested: ${contentId}`);
// Retrieve the content
const content = await graphlit.getContent(contentId);
console.log(`Content markdown: ${content.content.markdown}`);Ingest text (snake_case method)
Note: Python SDK uses named parameters, order doesn't matter
Parameters
Required
Optional
Response
Developer Hints
Key Differences from ingestUri
When to Use ingestText vs ingestUri
Understanding isSynchronous
Variations
1. Ingesting with Collections
2. Ingesting Markdown
3. Ingesting with Entity Extraction
4. Ingesting with Reference URI
Common Issues
Production Example
Last updated