Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

Desktop ql fixes (#1255)

Shubham Naikbeccaa893998
diff --git a/letta/settings.py b/letta/settings.py
index 08088f461..f5c67d778 100644
--- a/letta/settings.py
+++ b/letta/settings.py
@@ -119,18 +119,17 @@ class ModelSettings(BaseSettings):
env_cors_origins = os.getenv("ACCEPTABLE_ORIGINS")
-cors_origins = (
- [
- "http://letta.localhost",
- "http://localhost:8283",
- "http://localhost:8083",
- "http://localhost:3000",
- "http://localhost:4200",
- ]
- + [env_cors_origins]
- if env_cors_origins
- else []
-)
+cors_origins = [
+ "http://letta.localhost",
+ "http://localhost:8283",
+ "http://localhost:8083",
+ "http://localhost:3000",
+ "http://localhost:4200",
+]
+
+# attach the env_cors_origins to the cors_origins if it exists
+if env_cors_origins:
+ cors_origins.extend(env_cors_origins.split(","))
# read pg_uri from ~/.letta/pg_uri or set to none, this is to support Letta Desktop
default_pg_uri = None