Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
fix: make auth endpoint work with user API keys (#1385)
Charles Packer6889f63e2ce8
diff --git a/memgpt/server/rest_api/auth/index.py b/memgpt/server/rest_api/auth/index.pyindex ffa33075f..065f4ee1f 100644--- a/memgpt/server/rest_api/auth/index.py+++ b/memgpt/server/rest_api/auth/index.py@@ -28,8 +28,10 @@ def setup_auth_router(server: SyncServer, interface: QueuingInterface, password:interface.clear()try:if request.password != password:- raise HTTPException(status_code=400, detail="Incorrect credentials")- response = server.authenticate_user()+ # raise HTTPException(status_code=400, detail="Incorrect credentials")+ response = server.api_key_to_user(api_key=request.password)+ else:+ response = server.authenticate_user()except HTTPException:raiseexcept Exception as e: