mirror of
https://github.com/ParisNeo/lollms.git
synced 2025-01-01 18:36:45 +00:00
added summerization
This commit is contained in:
parent
1908ee3532
commit
88a58e6c65
@ -1356,6 +1356,14 @@ class APScript(StateMachine):
|
|||||||
|
|
||||||
|
|
||||||
# ================================================= Advanced methods ===========================================
|
# ================================================= Advanced methods ===========================================
|
||||||
|
def remove_backticks(self, text):
|
||||||
|
if text.startswith("```"):
|
||||||
|
split_text = text.split("\n")
|
||||||
|
text = "\n".join(split_text[1:])
|
||||||
|
if text.endswith("```"):
|
||||||
|
text= text[:-3]
|
||||||
|
return text
|
||||||
|
|
||||||
def summerize(self, chunks, summary_instruction="summerize", chunk_name="chunk", answer_start=""):
|
def summerize(self, chunks, summary_instruction="summerize", chunk_name="chunk", answer_start=""):
|
||||||
summeries = []
|
summeries = []
|
||||||
for i, chunk in enumerate(chunks):
|
for i, chunk in enumerate(chunks):
|
||||||
|
Loading…
Reference in New Issue
Block a user