mirror of
https://github.com/ParisNeo/lollms.git
synced 2024-12-20 05:08:00 +00:00
Update personality.py
This commit is contained in:
parent
3876c16527
commit
794e5a5b8b
@ -2567,7 +2567,7 @@ class APScript(StateMachine):
|
|||||||
while len(tk)>max_summary_size and (document_chunks is None or len(document_chunks)>1):
|
while len(tk)>max_summary_size and (document_chunks is None or len(document_chunks)>1):
|
||||||
self.step_start(f"Comprerssing {doc_name}...")
|
self.step_start(f"Comprerssing {doc_name}...")
|
||||||
chunk_size = int(self.personality.config.ctx_size*0.6)
|
chunk_size = int(self.personality.config.ctx_size*0.6)
|
||||||
document_chunks = TextChunker.chunk_text(text, self.model, chunk_size, 0, True)
|
document_chunks = TextChunker.chunk_text(text, self.personality.model, chunk_size, 0, True)
|
||||||
text = self.summarize_chunks(
|
text = self.summarize_chunks(
|
||||||
document_chunks,
|
document_chunks,
|
||||||
summary_instruction,
|
summary_instruction,
|
||||||
@ -2604,7 +2604,7 @@ class APScript(StateMachine):
|
|||||||
prev_len = len(tk)
|
prev_len = len(tk)
|
||||||
while len(tk)>max_summary_size:
|
while len(tk)>max_summary_size:
|
||||||
chunk_size = int(self.personality.config.ctx_size*0.6)
|
chunk_size = int(self.personality.config.ctx_size*0.6)
|
||||||
document_chunks = TextChunker.chunk_text(text, self.model, chunk_size, 0, True)
|
document_chunks = TextChunker.chunk_text(text, self.personality.model, chunk_size, 0, True)
|
||||||
text = self.summarize_chunks(
|
text = self.summarize_chunks(
|
||||||
document_chunks,
|
document_chunks,
|
||||||
data_extraction_instruction,
|
data_extraction_instruction,
|
||||||
|
Loading…
Reference in New Issue
Block a user