mirror of
https://github.com/ParisNeo/lollms.git
synced 2024-12-20 05:08:00 +00:00
added summerization
This commit is contained in:
parent
1908ee3532
commit
88a58e6c65
@ -1356,6 +1356,14 @@ class APScript(StateMachine):
|
||||
|
||||
|
||||
# ================================================= 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=""):
|
||||
summeries = []
|
||||
for i, chunk in enumerate(chunks):
|
||||
|
Loading…
Reference in New Issue
Block a user