Update personality.py

This commit is contained in:
Saifeddine ALOUI 2024-01-23 09:56:36 +01:00 committed by GitHub
parent 0a255b9e17
commit 8087904aef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2392,10 +2392,9 @@ The AI should respond in this format using data from actions_list:
code_blocks = []
for match in matches:
index = text.index(match[0])
content = match[3].strip()
content = match[3].strip() or text[index:]
language = match[1] or ''
type_ = 'code' if not match[1] else 'markup' if match[2] else 'language-specific'
code_blocks.append({
'index': index,
'content': content,