mirror of
https://github.com/ParisNeo/lollms.git
synced 2025-01-20 19:49:25 +00:00
upgraded
This commit is contained in:
parent
8ca1e3c2c0
commit
8ba91e75c6
@ -993,6 +993,9 @@ class LollmsApplication(LoLLMsCom):
|
||||
if not self.personality.ignore_discussion_documents_rag:
|
||||
query = None
|
||||
if len(self.active_rag_dbs) > 0 :
|
||||
if discussion is None:
|
||||
discussion = self.recover_discussion(client_id)
|
||||
|
||||
if self.config.data_vectorization_build_keys_words:
|
||||
self.personality.step_start("Building vector store query")
|
||||
query = self.personality.fast_gen(f"{separator_template}{start_header_id_template}instruction: Read the discussion and rewrite the last prompt for someone who didn't read the entire discussion.\nDo not answer the prompt. Do not add explanations.{separator_template}{start_header_id_template}discussion:\n{discussion[-2048:]}{separator_template}{start_header_id_template}enhanced query: ", max_generation_size=256, show_progress=True, callback=self.personality.sink)
|
||||
|
@ -236,6 +236,7 @@ def mount_rag_database(database_infos: MountDatabase):
|
||||
from lollmsvectordb import VectorDatabase
|
||||
from lollmsvectordb.text_document_loader import TextDocumentsLoader
|
||||
v = BERTVectorizer()
|
||||
vdb = VectorDatabase(Path(path)/"db_name.sqlite", v)
|
||||
vdb = VectorDatabase(Path(path)/"db_name.sqlite", v)
|
||||
vdb.build_index()
|
||||
lollmsElfServer.active_rag_dbs.append({"name":database_infos.database_name,"path":path,"vectorizer":vdb})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user