langchain-writer
, we provide usage of Writer’s context-aware splitting endpoint as a LangChain text splitter.
Class | Package | Local | Serializable | JS support | Package downloads | Package latest |
---|---|---|---|---|---|---|
WriterTextSplitter | langchain-writer | ❌ | ❌ | ❌ |
WriterTextSplitter
is available in the langchain-writer
package:
LANGSMITH_TRACING
and LANGSMITH_API_KEY
environment variables:
WriterTextSplitter
with the strategy
parameter set to one of the following:
llm_split
: Uses language model for precise semantic splittingfast_split
: Uses heuristic-based approach for quick splittinghybrid_split
: Combines both approachesWriterTextSplitter
can be used synchronously or asynchronously.
WriterTextSplitter
synchronously, call the split_text
method with the text you want to split:
WriterTextSplitter
asynchronously, call the asplit_text
method with the text you want to split:
WriterTextSplitter
features and configurations head to the API reference.