INNER CODE UNIT · Python

__call__

derisk-ai/OpenDerisk · packages/derisk-app/src/derisk_app/app.py:14

    async def __call__(self, scope, receive, send):
        if scope["type"] == "websocket":
            # WebSocket connections should not reach static files
            # Let them fall through to 404 or other handlers
            await send({"type": "websocket.close", "code": 1000})
            return
        await super().__call__(scope, receive, send)


from derisk._version import version
from derisk.component import SystemApp
from derisk.configs.model_config import (
    STATIC_MESSAGE_IMG_PATH,
)
from derisk.util.fastapi import create_app as create_fastapi_app, replace_router
from derisk.util.i18n_utils import _
from derisk.util.i18n_utils import set_default_language
from derisk.util.tracer import initialize_tracer

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…