mirror of
https://github.com/ParisNeo/lollms.git
synced 2024-12-18 20:27:58 +00:00
new conf
This commit is contained in:
parent
56980df6ec
commit
d6532fbaf6
@ -1,5 +1,5 @@
|
||||
# =================== Lord Of Large Language Multimodal Systems Configuration file ===========================
|
||||
version: 63
|
||||
version: 64
|
||||
binding_name: null
|
||||
model_name: null
|
||||
|
||||
@ -11,6 +11,8 @@ turn_on_code_validation: True
|
||||
turn_on_open_file_validation: False
|
||||
turn_on_send_file_validation: False
|
||||
|
||||
force_accept_remote_access: false
|
||||
|
||||
# Server information
|
||||
headless_server_mode: False
|
||||
allowed_origins: []
|
||||
|
@ -1,8 +1,19 @@
|
||||
# =================== Lord Of Large Language Multimodal Systems Configuration file ===========================
|
||||
version: 58
|
||||
version: 64
|
||||
binding_name: null
|
||||
model_name: null
|
||||
|
||||
show_news_panel: True
|
||||
|
||||
# Execution protection
|
||||
turn_on_code_execution: True
|
||||
turn_on_code_validation: True
|
||||
turn_on_open_file_validation: False
|
||||
turn_on_send_file_validation: False
|
||||
|
||||
force_accept_remote_access: false
|
||||
|
||||
# Server information
|
||||
headless_server_mode: False
|
||||
allowed_origins: []
|
||||
|
||||
|
@ -42,11 +42,32 @@ async def serve_user_infos(path: str):
|
||||
ASCIIColors.error("A suspected LFI attack detected. The path sent to the server has .. in it!")
|
||||
raise HTTPException(status_code=400, detail="Invalid path!")
|
||||
|
||||
file_path = (lollmsElfServer.lollms_paths.personal_user_infos_path / path.path).resolve()
|
||||
file_path = (lollmsElfServer.lollms_paths.personal_user_infos_path / path).resolve()
|
||||
return FileResponse(str(file_path))
|
||||
|
||||
# ----------------------------------- Lollms zoos -----------------------------------------
|
||||
@router.get("/bindings/{path:path}")
|
||||
async def serve_bindings(path: str):
|
||||
"""
|
||||
Serve bindings file.
|
||||
|
||||
Args:
|
||||
path (FilePath): The path of the bindings file to serve.
|
||||
|
||||
Returns:
|
||||
FileResponse: The file response containing the requested bindings file.
|
||||
"""
|
||||
if ".." in path:
|
||||
ASCIIColors.error("A suspected LFI attack detected. The path sent to the server has .. in it!")
|
||||
raise HTTPException(status_code=400, detail="Invalid path!")
|
||||
|
||||
file_path = (lollmsElfServer.lollms_paths.bindings_zoo_path / path).resolve()
|
||||
|
||||
if not Path(file_path).exists():
|
||||
raise ValueError("File not found")
|
||||
|
||||
return FileResponse(str(file_path))
|
||||
@router.get("/personalities/{path:path}")
|
||||
async def serve_personalities(path: str):
|
||||
"""
|
||||
Serve personalities file.
|
||||
|
Loading…
Reference in New Issue
Block a user