urls.py 2.2 KB

12345678910111213141516171819202122232425262728293031
  1. from django.urls import path
  2. from application.views import ChatRecordDetailView, ChatRecordLinkView
  3. from chat.views.mcp import mcp_view
  4. from . import views
  5. app_name = 'chat'
  6. # @formatter:off
  7. urlpatterns = [
  8. path('embed', views.ChatEmbedView.as_view()),
  9. path('mcp', mcp_view),
  10. path('auth/anonymous', views.AnonymousAuthentication.as_view()),
  11. path('profile', views.AuthProfile.as_view()),
  12. path('application/profile', views.ApplicationProfile.as_view(), name='profile'),
  13. path('chat_message/<str:chat_id>', views.ChatView.as_view(), name='chat'),
  14. path('open', views.OpenView.as_view(), name='open'),
  15. path('text_to_speech', views.TextToSpeech.as_view()),
  16. path('speech_to_text', views.SpeechToText.as_view()),
  17. path('captcha', views.CaptchaView.as_view(), name='captcha'),
  18. path('<str:application_id>/chat/completions', views.OpenAIView.as_view(), name='application/chat_completions'),
  19. path('vote/chat/<str:chat_id>/chat_record/<str:chat_record_id>', views.VoteView.as_view(), name='vote'),
  20. path('historical_conversation', views.HistoricalConversationView.as_view(), name='historical_conversation'),
  21. path('historical_conversation/<str:chat_id>/record/<str:chat_record_id>',views.ChatRecordView.as_view(),name='conversation_details'),
  22. path('historical_conversation/<int:current_page>/<int:page_size>', views.HistoricalConversationView.PageView.as_view(), name='historical_conversation'),
  23. path('historical_conversation/clear',views.HistoricalConversationView.BatchDelete.as_view(), name='historical_conversation_clear'),
  24. path('historical_conversation/<str:chat_id>',views.HistoricalConversationView.Operate.as_view(), name='historical_conversation_operate'),
  25. path('historical_conversation_record/<str:chat_id>', views.HistoricalConversationRecordView.as_view(), name='historical_conversation_record'),
  26. path('historical_conversation_record/<str:chat_id>/<int:current_page>/<int:page_size>', views.HistoricalConversationRecordView.PageView.as_view(), name='historical_conversation_record'),
  27. path('share/<str:link>', ChatRecordDetailView.as_view()),
  28. path('<str:application_id>/chat/<str:chat_id>/share_chat', ChatRecordLinkView.as_view()),
  29. ]