Update chat_bar.py

This commit is contained in:
Saifeddine ALOUI 2024-05-13 14:25:58 +02:00 committed by GitHub
parent 90b4e9d3ec
commit 2edabe56b5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -123,9 +123,9 @@ async def add_webpage(request: AddWebPageRequest):
ASCIIColors.yellow("Scaping web page")
client = lollmsElfServer.session.get_client(request.client_id)
url = request.url
index = find_first_available_file_index(lollmsElfServer.lollms_paths.personal_uploads_path,"web_",".txt")
index = find_first_available_file_index(client.discussion.discussion_folder/"text_data","web_",".txt")
try:
file_path=sanitize_path(str(lollmsElfServer.lollms_paths.personal_uploads_path/f"web_{index}.txt"),True)
file_path=sanitize_path(str(client.discussion.discussion_folder/"text_data"/f"web_{index}.txt"),True)
except Exception as ex:
lollmsElfServer.HideBlockingMessage()
raise ex