enhanced internet search

This commit is contained in:
Saifeddine ALOUI 2024-12-04 00:50:34 +01:00
parent 385b235acc
commit ec2d3a9113
2 changed files with 5 additions and 2 deletions

View File

@ -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"

View File

@ -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 = ""