-
Notifications
You must be signed in to change notification settings - Fork 337
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add semantic chunking * working * precommit * pre-commits
- Loading branch information
1 parent
44e6fd8
commit fe42fbd
Showing
9 changed files
with
351 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# import asyncio | ||
# import logging | ||
# from typing import Any, AsyncGenerator, Optional, Union | ||
|
||
# from core.base import ( | ||
# AsyncPipe, | ||
# PipeType, | ||
# R2RLoggingProvider, | ||
# ) | ||
|
||
|
||
# class ChunkEnrichmentPipe(AsyncPipe): | ||
# """ | ||
# Enriches chunks using a specified embedding model. | ||
# """ | ||
|
||
# class Input(AsyncPipe.Input): | ||
# message: list[DocumentExtraction] | ||
|
||
|
||
# def __init__(self, config: AsyncPipe.PipeConfig, type: PipeType = PipeType.INGESTOR, pipe_logger: Optional[R2RLoggingProvider] = None): | ||
# super().__init__(config, type, pipe_logger) | ||
|
||
# async def run(self, input: Input, state: Optional[AsyncState] = None, run_manager: Optional[RunManager] = None) -> AsyncGenerator[DocumentExtraction, None]: | ||
# pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
chunk_enrichment: | ||
template: > | ||
## Task: | ||
You are given a chunk of text. Your task is to enrich it with additional context from additional chunks that form the context of the chunk. | ||
Please make sure that the additional context you provide is relevant to the chunk. | ||
## Context Chunks: | ||
{context_chunks} | ||
## Chunk: | ||
{chunk} | ||
Note that: | ||
- You will make the chunk extremely precise and useful | ||
## Response: | ||
input_types: | ||
chunk: str | ||
context_chunks: str |
Oops, something went wrong.