This commit is contained in:
Saifeddine ALOUI 2025-02-18 01:58:21 +01:00
parent 681cc0e122
commit a0009bd7e4
2 changed files with 8 additions and 8 deletions

View File

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

@ -1 +1 @@
Subproject commit db32844d62c2d920da5a6e455bda035ff83d11b0
Subproject commit 27f40f2464c2e7a0befb70ee7dc7ff9ee4d32dec