This commit is contained in:
Saifeddine ALOUI 2024-11-07 00:04:01 +01:00
parent 40b9462479
commit 662dc241bb
2 changed files with 12 additions and 10 deletions

View File

@ -4240,7 +4240,7 @@ transition-all duration-300 ease-in-out">
bloc_index += 1
except Exception as ex:
if bloc_index % 2 == 1:
index = len(remaining)
index = index+len(remaining)
indices.append(index)
remaining = ""
@ -4303,12 +4303,13 @@ transition-all duration-300 ease-in-out">
if index + 1 < len(indices):
next_pos = indices[index + 1] - code_delimiter_position
if next_pos - 3 < len(sub_text) and sub_text[next_pos - 3] == "`":
block_infos["content"] = sub_text[start_pos:next_pos - 3].strip()
block_infos["is_complete"] = True
else:
block_infos["content"] = sub_text[start_pos:next_pos].strip()
block_infos["is_complete"] = False
if next_pos - 3>0:
if next_pos - 3 < len(sub_text) and sub_text[next_pos - 3] == "`":
block_infos["content"] = sub_text[start_pos:next_pos - 3].strip()
block_infos["is_complete"] = True
else:
block_infos["content"] = sub_text[start_pos:next_pos].strip()
block_infos["is_complete"] = False
if return_remaining_text:
last_end = indices[index + 1] + 3

View File

@ -137,9 +137,10 @@ def get_all_personalities():
pers = personality_folder.stem
if lollmsElfServer.personality.personality_folder_name==pers:
personality = lollmsElfServer.personality
real_assets_path = lollmsElfServer.lollms_paths.personalities_zoo_path / personality.category / personality.personality_folder_name / 'assets'
assets_path = Path("personalities") / personality.category / personality.personality_folder_name / 'assets'
lollmsElfServer.lollms_paths.custom_personalities_path
real_assets_path = lollmsElfServer.lollms_paths.personalities_zoo_path / personality.personality_folder_name / 'assets'
category = personality.category if category_folder!=lollmsElfServer.lollms_paths.custom_personalities_path!=category_folder else "custom_personalities"
assets_path = Path("personalities") / category / personality.personality_folder_name / 'assets'
gif_logo_path = assets_path / 'logo.gif'
webp_logo_path = assets_path / 'logo.webp'
png_logo_path = assets_path / 'logo.png'