mirror of
https://github.com/ParisNeo/lollms.git
synced 2024-12-21 21:47:54 +00:00
Merge pull request #24 from tobitege/main
Personality: allow lua, cs and pas files
This commit is contained in:
commit
ec9736cd6b
@ -880,7 +880,10 @@ class AIPersonality:
|
||||
database_dict=None)
|
||||
ASCIIColors.green("Ok")
|
||||
else:
|
||||
files = [f for f in self.data_path.iterdir() if f.suffix.lower() in ['.sh', '.json', '.sym', '.log', '.snippet', '.se', '.yml', '.snippets', '.lua', '.pdf', '.md', '.docx', '.yaml', '.inc', '.txt', '.ini', '.pas', '.pptx', '.map', '.php', '.xlsx', '.rtf', '.hpp', '.h', '.asm', '.xml', '.hh', '.sql', '.java', '.c', '.html', '.inf', '.rb', '.py', '.cs', '.js', '.bat', '.css', '.s', '.cpp', '.csv'] ]
|
||||
files = [f for f in self.data_path.iterdir() if f.suffix.lower() in ['.asm', '.bat', '.c', '.cpp', '.cs', '.csproj', '.css',
|
||||
'.csv', '.docx', '.h', '.hh', '.hpp', '.html', '.inc', '.ini', '.java', '.js', '.json', '.log',
|
||||
'.lua', '.map', '.md', '.pas', '.pdf', '.php', '.pptx', '.ps1', '.py', '.rb', '.rtf', '.s', '.se', '.sh', '.sln',
|
||||
'.snippet', '.snippets', '.sql', '.sym', '.ts', '.txt', '.xlsx', '.xml', '.yaml', '.yml'] ]
|
||||
if len(files)>0:
|
||||
dl = GenericDataLoader()
|
||||
self.persona_data_vectorizer = TextVectorizer(
|
||||
|
@ -50,8 +50,12 @@ def add_events(sio:socketio):
|
||||
import mimetypes
|
||||
|
||||
ALLOWED_EXTENSIONS = {
|
||||
'txt', 'csv', 'py', 'html', 'js', 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'tiff', 'ico', 'svg', 'mp4', 'mp3', 'avi', 'mov',
|
||||
'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'pdf', 'js', "md", "json"
|
||||
'asm', 'avi', 'bat', 'bmp', 'c', 'cpp', 'cs', 'csproj', 'css', 'csv', 'doc', 'docx',
|
||||
'gif', 'h', 'hh', 'hpp', 'html', 'ico', 'inc', 'ini', 'java', 'jpeg', 'jpg',
|
||||
'js', 'json', 'log', 'lua', 'map', 'md', 'mov', 'mp3', 'mp4', 'pas', 'pdf',
|
||||
'php', 'png', 'ppt', 'pptx', 'ps1', 'py', 'rb', 'rtf', 's', 'se', 'sh', 'sln', 'snippet',
|
||||
'snippets', 'sql', 'svg', 'sym', 'tif', 'tiff', 'ts', 'txt', 'wav', 'webp',
|
||||
'xlsx', 'xls', 'xml', 'yaml', 'yml'
|
||||
}
|
||||
|
||||
def allowed_file(filename):
|
||||
|
Loading…
Reference in New Issue
Block a user