|
9 | 9 | # fmt: off |
10 | 10 |
|
11 | 11 | v3=[ |
12 | | - path('knowledge/<uuid:knowledge_id>/retrieve', retrieve_view), |
13 | | - path('knowledge/<uuid:knowledge_id>/mcp', knowledge_mcp_view), |
14 | | - # ---- application 作用域:application_id 从 path 获取 ---- |
15 | | - path('application/<str:application_id>/', include([ |
16 | | - path("profile",v3_views.ApplicationProfile.as_view(), name='v3_profile'), |
17 | | - path('open', v3_views.OpenView.as_view(), name='v3_open'), |
18 | | - path('text_to_speech',v3_views.TextToSpeech.as_view(),name='v3_text_to_speech'), |
19 | | - path('speech_to_text',v3_views.SpeechToText.as_view(),name='v3_speech_to_text'), |
20 | | - path('chat/completions',v3_views.OpenAIView.as_view(), name='v3_chat_completions'), |
21 | | - path('chat/clear',v3_views.HistoricalConversationView.BatchDelete.as_view(), name='v3_historical_conversation_clear'), |
22 | | - path('chat',v3_views.HistoricalConversationView.as_view(), name='v3_historical_conversation'), |
23 | | - path('chat/<int:current_page>/<int:page_size>',v3_views.HistoricalConversationView.PageView.as_view(),name='v3_historical_conversation_page'), |
24 | | - path('chat/<str:chat_id>/chat_message',v3_views.ChatView.as_view(), name='v3_chat'), |
25 | | - path('chat/<str:chat_id>/chat_record',v3_views.HistoricalConversationRecordView.as_view(), name='v3_historical_conversation_record'), |
26 | | - path('chat/<str:chat_id>/chat_record/<int:current_page>/<int:page_size>', v3_views.HistoricalConversationRecordView.PageView.as_view(), name='v3_historical_conversation_record_page'), |
27 | | - path('chat/<str:chat_id>/chat_record/<str:chat_record_id>',v3_views.ChatRecordView.as_view(),name='v3_conversation_details'), |
28 | | - path('chat/<str:chat_id>/chat_record/<str:chat_record_id>/vote',v3_views.VoteView.as_view(), name='v3_vote'), |
29 | | - path('chat/<str:chat_id>/share_chat',ChatRecordLinkView.as_view(),name='v3_share_chat'), |
30 | | - path('chat/<str:chat_id>',v3_views.HistoricalConversationView.Operate.as_view(), name='v3_historical_conversation_operate'), |
31 | | -])), |
32 | | - # ---- 全局(非 application 作用域)---- |
33 | | - path('embed', v3_views.ChatEmbedView.as_view()), |
34 | | - path('mcp', v3_views.mcp_view), |
35 | | - path('auth/anonymous', v3_views.AnonymousAuthentication.as_view()), |
36 | | - path('auth/login', v3_views.LocalLoginView.as_view()), |
37 | | - path('auth/logout', v3_views.Logout.as_view(), name='v3_logout'), |
38 | | - path('profile', v3_views.AuthProfile.as_view()), |
39 | | - path('captcha', v3_views.CaptchaView.as_view(), name='v3_captcha'), |
40 | | - path('share/<str:link>', ChatRecordDetailView.as_view()), |
41 | | - path('chat_message/<str:chat_id>/cancel', v3_views.CancelWorkflowView.as_view(), name='v3_cancel_workflow'), |
42 | | - path('chat_user/profile', v3_views.ChatUserProfileView.as_view(), name='v3_chat_user_profile'), |
43 | | - path('chat_user/current/reset_password', v3_views.ResetCurrentUserPasswordView.as_view(), name='v3_reset_password_current'), |
44 | | - path('api_key', v3_views.ChatUserApiKeyView.as_view()), |
45 | | - path('api_key/<int:current_page>/<int:page_size>', v3_views.ChatUserApiKeyView.Page.as_view()), |
46 | | - path('api_key/<str:api_key_id>', v3_views.ChatUserApiKeyView.Operate.as_view()), |
47 | | - path('portal/application/<int:current_page>/<int:page_size>', v3_views.PortalApplicationView.as_view(), name='v3_portal_application'), |
48 | | - path('portal/chat/<int:current_page>/<int:page_size>', v3_views.PortalHistoricalConversationView.as_view(), name='v3_portal_historical_conversation'), |
| 12 | + # ---- application 作用域:application_id 从 path 获取 ---- |
| 13 | + path('application/<str:application_id>/', include([ |
| 14 | + path("profile",v3_views.ApplicationProfile.as_view(), name='v3_profile'), |
| 15 | + path('open', v3_views.OpenView.as_view(), name='v3_open'), |
| 16 | + path('text_to_speech',v3_views.TextToSpeech.as_view(),name='v3_text_to_speech'), |
| 17 | + path('speech_to_text',v3_views.SpeechToText.as_view(),name='v3_speech_to_text'), |
| 18 | + path('chat/completions',v3_views.OpenAIView.as_view(), name='v3_chat_completions'), |
| 19 | + path('chat/clear',v3_views.HistoricalConversationView.BatchDelete.as_view(), name='v3_historical_conversation_clear'), |
| 20 | + path('chat',v3_views.HistoricalConversationView.as_view(), name='v3_historical_conversation'), |
| 21 | + path('chat/<int:current_page>/<int:page_size>',v3_views.HistoricalConversationView.PageView.as_view(),name='v3_historical_conversation_page'), |
| 22 | + path('chat/<str:chat_id>/chat_message',v3_views.ChatView.as_view(), name='v3_chat'), |
| 23 | + path('chat/<str:chat_id>/chat_record',v3_views.HistoricalConversationRecordView.as_view(), name='v3_historical_conversation_record'), |
| 24 | + path('chat/<str:chat_id>/chat_record/<int:current_page>/<int:page_size>', v3_views.HistoricalConversationRecordView.PageView.as_view(), name='v3_historical_conversation_record_page'), |
| 25 | + path('chat/<str:chat_id>/chat_record/<str:chat_record_id>',v3_views.ChatRecordView.as_view(),name='v3_conversation_details'), |
| 26 | + path('chat/<str:chat_id>/chat_record/<str:chat_record_id>/vote',v3_views.VoteView.as_view(), name='v3_vote'), |
| 27 | + path('chat/<str:chat_id>/share_chat',ChatRecordLinkView.as_view(),name='v3_share_chat'), |
| 28 | + path('chat/<str:chat_id>',v3_views.HistoricalConversationView.Operate.as_view(), name='v3_historical_conversation_operate'), |
| 29 | + ])), |
| 30 | + # ---- 全局(非 application 作用域)---- |
| 31 | + path('embed', v3_views.ChatEmbedView.as_view()), |
| 32 | + path('mcp', v3_views.mcp_view), |
| 33 | + path('auth/anonymous', v3_views.AnonymousAuthentication.as_view()), |
| 34 | + path('auth/login', v3_views.LocalLoginView.as_view()), |
| 35 | + path('auth/logout', v3_views.Logout.as_view(), name='v3_logout'), |
| 36 | + path('profile', v3_views.AuthProfile.as_view()), |
| 37 | + path('captcha', v3_views.CaptchaView.as_view(), name='v3_captcha'), |
| 38 | + path('share/<str:link>', ChatRecordDetailView.as_view()), |
| 39 | + path('chat_message/<str:chat_id>/cancel', v3_views.CancelWorkflowView.as_view(), name='v3_cancel_workflow'), |
| 40 | + path('chat_user/profile', v3_views.ChatUserProfileView.as_view(), name='v3_chat_user_profile'), |
| 41 | + path('chat_user/current/reset_password', v3_views.ResetCurrentUserPasswordView.as_view(), name='v3_reset_password_current'), |
| 42 | + path('api_key', v3_views.ChatUserApiKeyView.as_view()), |
| 43 | + path('api_key/<int:current_page>/<int:page_size>', v3_views.ChatUserApiKeyView.Page.as_view()), |
| 44 | + path('api_key/<str:api_key_id>', v3_views.ChatUserApiKeyView.Operate.as_view()), |
| 45 | + path('portal/application/<int:current_page>/<int:page_size>', v3_views.PortalApplicationView.as_view(), name='v3_portal_application'), |
| 46 | + path('portal/chat/<int:current_page>/<int:page_size>', v3_views.PortalHistoricalConversationView.as_view(), name='v3_portal_historical_conversation'), |
| 47 | + path('knowledge/<uuid:knowledge_id>/retrieve', retrieve_view), |
| 48 | + path('knowledge/<uuid:knowledge_id>/mcp', knowledge_mcp_view), |
49 | 49 | ] |
50 | 50 | v2=[ |
51 | 51 | path('embed', v2_views.ChatEmbedView.as_view()), |
|
0 commit comments