mirror of
https://github.com/ParisNeo/lollms.git
synced 2024-12-20 05:08:00 +00:00
Update personality.py
This commit is contained in:
parent
6a4c48c724
commit
9963df3e2b
@ -1631,7 +1631,10 @@ class APScript(StateMachine):
|
||||
import autopep8
|
||||
global_prompt = f"{prompt}\n!@>Code Builder:```python\n"
|
||||
code = self.fast_gen(global_prompt, max_title_length)
|
||||
try:
|
||||
back_quote_index = code.index("```") # Remove trailing backticks
|
||||
except:
|
||||
pass
|
||||
if back_quote_index>=0:
|
||||
# Removing any extra text
|
||||
code = code[:back_quote_index]
|
||||
|
Loading…
Reference in New Issue
Block a user