Update comment

This commit is contained in:
William Fu-Hinthorn
2025-04-17 08:11:02 -07:00
parent 11619f9913
commit f2bc31c3f0
4 changed files with 2 additions and 16 deletions
-3
View File
@@ -6,8 +6,5 @@
},
"http": {
"app": "./src/langgraph_slack/server.py:APP"
},
"auth": {
"path": "./src/langgraph_slack/auth.py:auth"
}
}
-12
View File
@@ -1,12 +0,0 @@
from langgraph_sdk import Auth
auth = Auth()
@auth.authenticate
async def authenticate(request, path, headers, method):
user_agent = headers.get(b"user-agent")
if user_agent and user_agent.startswith(b"Slackbot"):
return {"identity": "default-user", "permissions": ["read", "write"]}
return None
+1 -1
View File
@@ -19,5 +19,5 @@ else:
LANGGRAPH_URL = environ.get("LANGGRAPH_URL")
ASSISTANT_ID = environ.get("LANGGRAPH_ASSISTANT_ID", "chat")
CONFIG = environ.get("CONFIG") or "{}"
DEPLOYMENT_URL = environ.get("DEPLOYMENT_URL", "")
DEPLOYMENT_URL = environ.get("DEPLOYMENT_URL")
SLACK_CHANNEL_ID = environ.get("SLACK_CHANNEL_ID")
+1
View File
@@ -14,6 +14,7 @@ from slack_bolt.async_app import AsyncApp
from langgraph_slack import config
LOGGER = logging.getLogger(__name__)
# Defaults to "None", meaning the loopback endpoint.
LANGGRAPH_CLIENT = get_client(url=config.LANGGRAPH_URL)
GRAPH_CONFIG = (
json.loads(config.CONFIG) if isinstance(config.CONFIG, str) else config.CONFIG