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.

fix: remove name from tool create error msg (#778)

cthomas0b03e707abd9
diff --git a/letta/server/rest_api/routers/v1/tools.py b/letta/server/rest_api/routers/v1/tools.py
index 14a9dc14b..73c0db0ce 100644
--- a/letta/server/rest_api/routers/v1/tools.py
+++ b/letta/server/rest_api/routers/v1/tools.py
@@ -83,7 +83,7 @@ def create_tool(
except UniqueConstraintViolationError as e:
# Log or print the full exception here for debugging
print(f"Error occurred: {e}")
- clean_error_message = f"Tool with name {request.name} already exists."
+ clean_error_message = f"Tool with this name already exists."
raise HTTPException(status_code=409, detail=clean_error_message)
except LettaToolCreateError as e:
# HTTP 400 == Bad Request
diff --git a/letta/server/server.py b/letta/server/server.py
index ef7a8ec63..21143a034 100644
--- a/letta/server/server.py
+++ b/letta/server/server.py
@@ -187,8 +187,8 @@ def db_error_handler():
exit(1)
-print("Creating engine", settings.letta_pg_uri)
if settings.letta_pg_uri_no_default:
+ print("Creating postgres engine", settings.letta_pg_uri)
config.recall_storage_type = "postgres"
config.recall_storage_uri = settings.letta_pg_uri_no_default
config.archival_storage_type = "postgres"
@@ -205,7 +205,10 @@ if settings.letta_pg_uri_no_default:
)
else:
# TODO: don't rely on config storage
- engine = create_engine("sqlite:///" + os.path.join(config.recall_storage_path, "sqlite.db"))
+ engine_path = "sqlite:///" + os.path.join(config.recall_storage_path, "sqlite.db")
+ print("Creating sqlite engine", engine_path)
+
+ engine = create_engine(engine_path)
# Store the original connect method
original_connect = engine.connect