mirror of
https://github.com/ParisNeo/lollms.git
synced 2025-01-03 11:24:13 +00:00
fixed
This commit is contained in:
parent
4aa43b9c1b
commit
14b8b5b4a8
@ -2705,6 +2705,7 @@ The AI should respond in this format using data from actions_list:
|
|||||||
return code_blocks
|
return code_blocks
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def build_and_execute_python_code(self,context, instructions, execution_function_signature):
|
def build_and_execute_python_code(self,context, instructions, execution_function_signature):
|
||||||
code = "```python\n"+self.fast_gen(
|
code = "```python\n"+self.fast_gen(
|
||||||
self.build_prompt([
|
self.build_prompt([
|
||||||
@ -2719,6 +2720,7 @@ The AI should respond in this format using data from actions_list:
|
|||||||
f"!@>coder: Here is the function that you are asking for:",
|
f"!@>coder: Here is the function that you are asking for:",
|
||||||
"```python\n"
|
"```python\n"
|
||||||
],2), callback=self.sink)
|
],2), callback=self.sink)
|
||||||
|
code = code.replace("```python\n```python\n", "```python\n")
|
||||||
code=self.extract_code_blocks(code)
|
code=self.extract_code_blocks(code)
|
||||||
|
|
||||||
if len(code)>0:
|
if len(code)>0:
|
||||||
|
Loading…
Reference in New Issue
Block a user