JustPaste
HomeCategoriesAboutDonateContactTerms of UsePrivacy Policy
JustPaste

Free online notepad — write and share instantly

Navigate

  • Home
  • Timeline
  • Categories

Info

  • About
  • Donate
  • Contact

Legal

  • Terms of Use
  • Privacy Policy

© 2026 JustPaste.app. All rights reserved.

Made with ♥ by JustPaste

fgg | JustPaste.app
about 2 months ago9 views
💻Technology

fgg

from llama_index.core.ingestion import (
    IngestionPipeline,
    IngestionCache,
)

from llama_index.core.node_parser import (
    SentenceSplitter
)

from config.settings import (
    CHUNK_SIZE,
    CHUNK_OVERLAP
)


def run_pipeline(documents):

    cache = IngestionCache(
        cache_dir="./cache"
    )

    pipeline = IngestionPipeline(
        transformations=[
            SentenceSplitter(
                chunk_size=CHUNK_SIZE,
                chunk_overlap=CHUNK_OVERLAP
            )
        ],
        cache=cache
    )

    nodes = pipeline.run(
        documents=documents
    )

    return nodes
← Back to timeline