Skip to content

Commit 85c6e58

Browse files
authored
Update doc for SplitRecursively about language. (#148)
1 parent 018f4c9 commit 85c6e58

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/docs/ops/functions.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ Input data:
1616
* `text` (type: `str`, required): The text to split.
1717
* `chunk_size` (type: `int`, required): The maximum size of each chunk, in bytes.
1818
* `chunk_overlap` (type: `int`, optional): The maximum overlap size between adjacent chunks, in bytes.
19-
* `language` (type: `str`, optional): The language of the document. Currently it supports `markdown`, `python` and `javascript`. If unspecified, will treat it as plain text.
19+
* `language` (type: `str`, optional): The language of the document.
20+
Can be a langauge name (e.g. `Python`, `Javascript`, `Markdown`) or a file extension (e.g. `.py`, `.js`, `.md`).
21+
To see all supported language names and extensions, see [the code](https://github.com/search?q=org%3Acocoindex-io+lang%3Arust++%22static+TREE_SITTER_LANGUAGE_BY_LANG%22&type=code).
22+
If it's unspecified or the specified language is not supported, it will be treated as plain text.
2023

2124
Return type: `Table`, each row represents a chunk, with the following sub fields:
2225

0 commit comments

Comments
 (0)