Skip to content

Commit 8fc24cd

Browse files
committed
working api to disable search rag features no ai provider
1 parent a6f5c61 commit 8fc24cd

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

swirl/urls.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343

4444
path('search/search', views.SearchViewSet.as_view({'get': 'list'}), name='search'),
4545
path('sapi/detail-search-rag/', views.DetailSearchRagView.as_view(), name='detail-search-rag'),
46+
path('sapi/is_chat_ai_provider_exists', views.IsChatAIProviderExists.as_view({'get': 'list'}), name='is-chat-ai-provider-exists'),
4647

4748
path('', views.index, name='index'),
4849
path('index.html', views.index, name='index'),

swirl/views.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -995,3 +995,13 @@ def list(self, request):
995995
return JsonResponse({}, status=status.HTTP_200_OK)
996996
else:
997997
return Response('Logo Object Not Found', status=status.HTTP_404_NOT_FOUND)
998+
999+
1000+
class IsChatAIProviderExists(viewsets.ModelViewSet):
1001+
1002+
def list(self, request):
1003+
# TODO: The Community Edition does not include an AI provider model.
1004+
# For now, we are setting the status to True as a temporary workaround.
1005+
# This should be updated once the AI provider model is implemented.
1006+
# This validation is used to enable or disable the second row of Search RAG.
1007+
return Response({'status': 'True'}, status=status.HTTP_200_OK)

0 commit comments

Comments
 (0)