From ec2d3a9113178869140a89709914ca6bdf6169fa Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Wed, 4 Dec 2024 00:50:34 +0100 Subject: [PATCH] enhanced internet search --- lollms/app.py | 2 +- lollms/personality.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lollms/app.py b/lollms/app.py index 994c594..da7701d 100644 --- a/lollms/app.py +++ b/lollms/app.py @@ -1030,7 +1030,7 @@ class LollmsApplication(LoLLMsCom): if self.config.internet_quick_search: self.personality.step_start("Performing Internet search (quick mode)") else: - self.personality.step_start("Performing Internet search (advanced mode: slower but more advanced)") + self.personality.step_start("Performing Internet search (advanced mode: slower but more accurate)") internet_search_results=f"{self.system_full_header}Use the web search results data to answer {self.config.user_name}. Try to extract information from the web search and use it to perform the requested task or answer the question. Do not come up with information that is not in the websearch results. Try to stick to the websearch results and clarify if your answer was based on the resuts or on your own culture. If you don't know how to perform the task, then tell the user politely that you need more data inputs.{self.separator_template}{self.start_header_id_template}Web search results{self.end_header_id_template}\n" diff --git a/lollms/personality.py b/lollms/personality.py index f70793e..131c580 100644 --- a/lollms/personality.py +++ b/lollms/personality.py @@ -3041,7 +3041,10 @@ class APScript(StateMachine): else: return code else: - return None + if return_full_generated_code: + return None, None + else: + return None def generate_text(self, prompt, images=[], max_size = None, temperature = None, top_k = None, top_p=None, repeat_penalty=None, repeat_last_n=None, callback=None, debug=False, return_full_generated_code=False, accept_all_if_no_code_tags_is_present=False): response_full = ""