mirror of
https://github.com/ParisNeo/lollms.git
synced 2024-12-19 20:57:58 +00:00
removed help serving
This commit is contained in:
parent
9fec7a86ec
commit
b156494894
@ -209,29 +209,6 @@ async def serve_data(path: str):
|
||||
|
||||
|
||||
|
||||
@router.get("/help/{path:path}")
|
||||
async def serve_help(path: str):
|
||||
"""
|
||||
Serve image file.
|
||||
|
||||
Args:
|
||||
filename (str): The name of the data file to serve.
|
||||
|
||||
Returns:
|
||||
FileResponse: The file response containing the requested data file.
|
||||
"""
|
||||
path = sanitize_path_from_endpoint(path)
|
||||
|
||||
root_dir = Path(os.getcwd())
|
||||
file_path = root_dir/'help/' / path
|
||||
|
||||
if not Path(file_path).exists():
|
||||
raise HTTPException(status_code=404, detail="File not found")
|
||||
|
||||
return FileResponse(str(file_path))
|
||||
|
||||
|
||||
|
||||
@router.get("/uploads/{path:path}")
|
||||
async def serve_uploads(path: str):
|
||||
"""
|
||||
|
@ -277,6 +277,7 @@ def show_custom_dialog(title, text, options):
|
||||
except Exception as ex:
|
||||
ASCIIColors.error(ex)
|
||||
return show_console_custom_dialog(title, text, options)
|
||||
|
||||
def show_yes_no_dialog(title, text):
|
||||
try:
|
||||
if sys.platform.startswith('win'):
|
||||
@ -293,7 +294,7 @@ def show_yes_no_dialog(title, text):
|
||||
|
||||
def show_windows_dialog(title, text):
|
||||
from ctypes import windll
|
||||
result = windll.user32.MessageBoxW(0, text, title, 4)
|
||||
result = windll.user32.MessageBoxW(0, text, title, 4 | 0x40000)
|
||||
return result == 6 # 6 means "Yes"
|
||||
|
||||
def show_macos_dialog(title, text):
|
||||
|
Loading…
Reference in New Issue
Block a user