19 lines
603 B
Python
19 lines
603 B
Python
from channels.routing import ProtocolTypeRouter, URLRouter
|
|
from django.urls import path
|
|
|
|
from .views import AiConfigApiView, AiApiView, AiDiscordApiView, AiChatTextApiView
|
|
from .websocket import DashboardConsumer
|
|
|
|
urlpatterns = [
|
|
path('api/v1/ai/<name>/chat/text', AiChatTextApiView.as_view()),
|
|
path('api/v1/ai/<name>/discord', AiDiscordApiView.as_view()),
|
|
path('api/v1/ai/config', AiConfigApiView.as_view()),
|
|
path('api/v1/ai', AiApiView.as_view()),
|
|
]
|
|
|
|
application = ProtocolTypeRouter({
|
|
'websocket': URLRouter([
|
|
path('ws/dashboard/', DashboardConsumer.as_asgi()),
|
|
])
|
|
})
|