0.1.12 • Published 27 days ago

smart-chunks v0.1.12

Weekly downloads
-
License
MIT
Repository
github
Last release
27 days ago

Smart Chunks

Smart Blocks (chunks) are intelligently designed chunks used to maximize the value of inputs into embedding models.

installation

npm install smart-chunks

usage

SmartMarkdown

const { SmartMarkdown } = require('smart-chunks');
const smart_markdown = new SmartMarkdown(optional_config);
const blocks = smart_markdown.parse({
  content: `# Heading 1\ntext\n## Heading 2\ntext`, // some markdown content
  file_path: './path/to/file.md', // optional: used to improve breadcrumbs (chunk context)
});

blocks

blocks is an array of objects with the following properties:

  • text: the text of the block
  • path: the path of the block (e.g. ./path/to/file.md#heading1#heading2)
  • length: the length of the block in characters

about

Designed for use with Smart Connections Obsidian plugin.

0.1.12

27 days ago

0.1.11

3 months ago

0.1.10

4 months ago

0.1.9

5 months ago

0.1.8

5 months ago

0.1.7

5 months ago

0.1.4

5 months ago

0.1.3

5 months ago

0.1.2

5 months ago

0.1.1

5 months ago

0.1.0

5 months ago