From a0009bd7e4da86ddf75691c9cfaec7c64ae421fe Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Tue, 18 Feb 2025 01:58:21 +0100 Subject: [PATCH] done --- lollms_webui.py | 14 +++++++------- zoos/functions_zoo | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lollms_webui.py b/lollms_webui.py index 7f61ad60..bb3e4f70 100644 --- a/lollms_webui.py +++ b/lollms_webui.py @@ -1734,18 +1734,18 @@ Don't forget encapsulate the code inside a markdown code tag. This is mandatory. try: if len(context_details.function_calls)>0: codes = self.personality.extract_code_blocks(client.generated_text) - for code in codes: - if code["type"]=="function": - infos = json.loads(code["content"]) - for function_call in context_details.function_calls: + for function_call in context_details.function_calls: + fc:FunctionCall = function_call["class"] + for code in codes: + if code["type"]=="function": + infos = json.loads(code["content"]) if infos["function_name"]==function_call["name"]: - fc:FunctionCall = function_call["class"] if fc.function_type == FunctionType.CLASSIC: self.personality.new_message("") output = fc.execute(**infos["function_parameters"]) self.personality.set_message_content(output) - elif fc.function_type == FunctionType.CONTEXT_UPDATE: - process_output = fc.process_output(context_details, process_output) + if fc.function_type == FunctionType.CONTEXT_UPDATE: + process_output = fc.process_output(context_details, client.generated_text) except Exception as ex: trace_exception(ex) diff --git a/zoos/functions_zoo b/zoos/functions_zoo index db32844d..27f40f24 160000 --- a/zoos/functions_zoo +++ b/zoos/functions_zoo @@ -1 +1 @@ -Subproject commit db32844d62c2d920da5a6e455bda035ff83d11b0 +Subproject commit 27f40f2464c2e7a0befb70ee7dc7ff9ee4d32dec