mirror of
https://github.com/langchain-ai/langgraph-messaging-integrations.git
synced 2026-07-01 13:19:54 -04:00
Update comment
This commit is contained in:
@@ -6,8 +6,5 @@
|
||||
},
|
||||
"http": {
|
||||
"app": "./src/langgraph_slack/server.py:APP"
|
||||
},
|
||||
"auth": {
|
||||
"path": "./src/langgraph_slack/auth.py:auth"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user