Add relevant chat context when query the index (#42)

* Add context for query

* Add older messages in the chat

* Update the indexing

* Make some hard-code values configurable

* Remove hard-code values
This commit is contained in:
Duc Nguyen (john)
2024-04-22 14:32:30 +07:00
committed by GitHub
parent 749c9e5641
commit fbe983ccb3
2 changed files with 112 additions and 17 deletions

View File

@@ -47,6 +47,8 @@ class DocumentIngestor(BaseComponent):
text_splitter: BaseSplitter = TokenSplitter.withx(
chunk_size=1024,
chunk_overlap=256,
separator="\n\n",
backup_separators=["\n", ".", " ", "\u200B"],
)
override_file_extractors: dict[str, Type[BaseReader]] = {}