From c97e5512f7bf595e84236760400eae56d76cd8be Mon Sep 17 00:00:00 2001 From: Shubham Naik Date: Thu, 23 Jan 2025 10:01:28 -0800 Subject: [PATCH] chore: do not render windows characters (#745) Co-authored-by: Shubham Naik --- letta/server/rest_api/app.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/letta/server/rest_api/app.py b/letta/server/rest_api/app.py index eaa73113..3617aa51 100644 --- a/letta/server/rest_api/app.py +++ b/letta/server/rest_api/app.py @@ -49,9 +49,12 @@ password = None # #typer.secho(f"Generated admin server password for this session: {password}", fg=typer.colors.GREEN) import logging +import platform from fastapi import FastAPI +is_windows = platform.system() == "Windows" + log = logging.getLogger("uvicorn") @@ -285,8 +288,14 @@ def start_server( ssl_certfile="certs/localhost.pem", ) else: - print(f"▶ Server running at: http://{host or 'localhost'}:{port or REST_DEFAULT_PORT}") - print(f"▶ View using ADE at: https://app.letta.com/development-servers/local/dashboard\n") + if is_windows: + # Windows doesn't those the fancy unicode characters + print(f"Server running at: http://{host or 'localhost'}:{port or REST_DEFAULT_PORT}") + print(f"View using ADE at: https://app.letta.com/development-servers/local/dashboard\n") + else: + print(f"▶ Server running at: http://{host or 'localhost'}:{port or REST_DEFAULT_PORT}") + print(f"▶ View using ADE at: https://app.letta.com/development-servers/local/dashboard\n") + uvicorn.run( app, host=host or "localhost",