diff --git a/lollms/personality.py b/lollms/personality.py index 2707e83..0abf2a8 100644 --- a/lollms/personality.py +++ b/lollms/personality.py @@ -2985,6 +2985,8 @@ The AI should respond in this format using data from actions_list: except: find_return = int(1e10) next_index = min(find_return, find_space) + if '{' in sub_text[:next_index]: + next_index =0 start_pos = next_index if code_delimiter_position+30: if hide_function_call: - self.full("") #Hide function call + self.full("") #Hide function + + if self.config.debug: + self.print_prompt("Function calls", json.dumps(function_calls, indent=4)) + outputs = self.execute_function_calls(function_calls,function_definitions) final_output = "\n".join([str(o) if type(o)==str else str(o[0]) if (type(o)==tuple or type(0)==list) and len(o)>0 else "" for o in outputs]) out += f"{separator_template}{start_header_id_template}function calls results{end_header_id_template}\n" + final_output