mirror of
https://github.com/zylon-ai/private-gpt.git
synced 2025-12-22 20:12:55 +01:00
Updated with semantic node parser and CondensePlusContextChatEngine and new system prompt
This commit is contained in:
parent
175b4e29ac
commit
ebe43082cd
3 changed files with 485 additions and 303 deletions
|
|
@ -4,7 +4,7 @@ from pathlib import Path
|
|||
from typing import TYPE_CHECKING, AnyStr, BinaryIO
|
||||
|
||||
from injector import inject, singleton
|
||||
from llama_index.core.node_parser import SentenceWindowNodeParser
|
||||
from llama_index.core.node_parser import SentenceWindowNodeParser, SemanticSplitterNodeParser
|
||||
from llama_index.core.storage import StorageContext
|
||||
|
||||
from private_gpt.components.embedding.embedding_component import EmbeddingComponent
|
||||
|
|
@ -39,7 +39,9 @@ class IngestService:
|
|||
docstore=node_store_component.doc_store,
|
||||
index_store=node_store_component.index_store,
|
||||
)
|
||||
node_parser = SentenceWindowNodeParser.from_defaults()
|
||||
node_parser = SemanticSplitterNodeParser.from_defaults(
|
||||
embed_model=embedding_component.embedding_model,
|
||||
)
|
||||
|
||||
self.ingest_component = get_ingestion_component(
|
||||
self.storage_context,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue