Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
chore: fix letta server file read issue (#685)
Shubham Naik492f01ac529c
diff --git a/letta/settings.py b/letta/settings.pyindex dde4cecb2..da3e429fb 100644--- a/letta/settings.py+++ b/letta/settings.py@@ -83,12 +83,16 @@ cors_origins = [# read pg_uri from ~/.letta/pg_uri or set to none, this is to support Letta Desktopdefault_pg_uri = None-try:- with open(Path.home() / ".letta/pg_uri", "r") as f:- default_pg_uri = f.read()- print("Read pg_uri from ~/.letta/pg_uri")-except FileNotFoundError:- pass+## check if --use-file-pg-uri is passed+import sys++if "--use-file-pg-uri" in sys.argv:+ try:+ with open(Path.home() / ".letta/pg_uri", "r") as f:+ default_pg_uri = f.read()+ print("Read pg_uri from ~/.letta/pg_uri")+ except FileNotFoundError:+ passclass Settings(BaseSettings):