Update lollms_client_js.js

This commit is contained in:
Saifeddine ALOUI 2024-12-17 16:04:11 +01:00 committed by GitHub
parent 0293355386
commit 723c85d369
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1298,17 +1298,18 @@ async summarizeChunks(
console.log(chunks[i]); console.log(chunks[i]);
summary = `${answerStart}` + await this.fastGen( summary = `${answerStart}` + await this.fastGen(
[ [
this.lollms.custom_system_message("Previous chunks summary:"), this.lollms.custom_system_message("Previous chunks summary"),
`${summary}`, `${summary}`,
this.lollms.custom_system_message("Current text chunk"), this.lollms.custom_system_message("Current text chunk"),
`${chunks[i]}`, `${chunks[i]}`,
this.lollms.system_message(), this.lollms.user_message(),
summaryInstruction, summaryInstruction,
"Keep only information relevant to the context", this.lollms.custom_system_message("important"),
"The output must keep information from the previous chunk analysis and add the current chunk extracted information.", "Keep only information relevant to the context provided by the user",
"Be precise and do not invent information that does not exist in the previous chunks analysis or the current chunk.", "The output must keep information from the previous chunks summary and add the current chunk extracted information.",
"Do not add any extra comments.", "Be precise and do not invent information that does not exist in the previous chunks summary or the current chunk.",
this.lollms.system_message() + answerStart "Do not add any extra comments and start your message directly by the summary.",
this.lollms.ai_message() + answerStart
].join("\n"), ].join("\n"),
maxGenerationSize, maxGenerationSize,
callback callback