/** * Adds content to the Cognee knowledge graph * * @param content - The content to add (text, file path, or URL) * @param options - Optional configuration for the add operation * @returns Promise that resolves to the operation result * * @example * ```typescript * const result = await addContent("Hello world", { * dataset: "main", * format: "text" * }); * ``` */ export async function addContent( content: string, options?: { dataset?: string; format?: 'text' | 'file' | 'url'; metadata?: Record<string, any>; } ): Promise<{ success: boolean; id: string; message: string; }> { // Implementation would go here return { success: true, id: 'content_123', message: 'Content added successfully' }; }
npm install ts-morph
import { generateDefinition, TSDoc } from 'nextra/tsdoc'
<TSDoc definition={generateDefinition({ code: `// Your TypeScript code here` })} />