mirror of
https://github.com/ParisNeo/lollms.git
synced 2024-12-24 06:46:40 +00:00
upgraded
This commit is contained in:
parent
2f13ea8fa9
commit
66143f5da9
@ -2702,7 +2702,7 @@ The AI should respond in this format using data from actions_list:
|
||||
return code_blocks
|
||||
|
||||
|
||||
def build_and_execute_python_code(self,context, instructions, execution_function_signature, inputs):
|
||||
def build_and_execute_python_code(self,context, instructions, execution_function_signature):
|
||||
code = "```python\n"+self.fast_gen("!@>context!:\n"+context+f"\n!@>instructions: {instructions}.\nHere is the signature of the function:\n{execution_function_signature}\n!@>Code: Here is the query function that you are asking for:\n```python\n", callback=self.sink)
|
||||
code=self.extract_code_blocks(code)
|
||||
|
||||
@ -2714,7 +2714,7 @@ The AI should respond in this format using data from actions_list:
|
||||
spec = importlib.util.spec_from_loader(module_name, loader=None)
|
||||
module = importlib.util.module_from_spec(spec)
|
||||
exec(code, module.__dict__)
|
||||
return module.query(*inputs)
|
||||
return module
|
||||
|
||||
|
||||
def yes_no(self, question: str, context:str="", max_answer_length: int = 50, conditionning="") -> bool:
|
||||
|
Loading…
Reference in New Issue
Block a user