repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | from typing import Optional |
| #2 | |
| #3 | from langchain.text_splitter import RecursiveCharacterTextSplitter |
| #4 | |
| #5 | from embedchain.chunkers.base_chunker import BaseChunker |
| #6 | from embedchain.config.add_config import ChunkerConfig |
| #7 | from embedchain.helpers.json_serializable import register_deserializable |
| #8 | |
| #9 | |
| #10 | @register_deserializable |
| #11 | class PostgresChunker(BaseChunker): |
| #12 | """Chunker for postgres.""" |
| #13 | |
| #14 | def __init__(self, config: Optional[ChunkerConfig] = None): |
| #15 | if config is None: |
| #16 | config = ChunkerConfig(chunk_size=1000, chunk_overlap=0, length_function=len) |
| #17 | text_splitter = RecursiveCharacterTextSplitter( |
| #18 | chunk_size=config.chunk_size, |
| #19 | chunk_overlap=config.chunk_overlap, |
| #20 | length_function=config.length_function, |
| #21 | ) |
| #22 | super().__init__(text_splitter) |
| #23 |