synced core

This commit is contained in:
Saifeddine ALOUI 2024-04-21 19:05:42 +02:00
parent a348791798
commit f5cc2ba34b
3 changed files with 8 additions and 2 deletions

View File

@ -1,6 +1,7 @@
import re
from lollms.utilities import PackageManager
from pipmaster import PackageManager
from bs4 import BeautifulSoup
def compress_js(js_code):
# Patterns to match function, class, and variable declarations
function_pattern = r"function\s+(\w+)\s*\(([^)]*)\)"

View File

@ -38,7 +38,7 @@ from lollms.com import LoLLMsCom
from lollms.helpers import trace_exception
from lollms.utilities import PackageManager
from lollms.code_parser import compress_js, compress_python
from lollms.code_parser import compress_js, compress_python, compress_html
import requests
@ -3274,6 +3274,8 @@ fetch('/open_file', {
return compress_js(code)
def compress_python(self, code):
return compress_python(code)
def compress_html(self, code):
return compress_html(code)
class AIPersonalityInstaller:
def __init__(self, personality:AIPersonality) -> None:

View File

@ -5,8 +5,11 @@ wget
setuptools
requests
safe_store
pipmaster
ascii_colors>=0.1.3
beautifulsoup4
autopep8