mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-17 03:56:31 +01:00
Update chat view decorators
This commit is contained in:
parent
3a9257f10a
commit
cce9dfd5b8
1 changed files with 8 additions and 3 deletions
|
|
@ -1173,8 +1173,14 @@ class DocumentViewSet(
|
|||
)
|
||||
|
||||
|
||||
@method_decorator(ensure_csrf_cookie, name="dispatch")
|
||||
@method_decorator(login_required, name="dispatch")
|
||||
@method_decorator(
|
||||
[
|
||||
ensure_csrf_cookie,
|
||||
login_required,
|
||||
cache_control(no_cache=True),
|
||||
],
|
||||
name="dispatch",
|
||||
)
|
||||
class ChatStreamingView(View):
|
||||
def post(self, request):
|
||||
request.compress_exempt = True
|
||||
|
|
@ -1210,7 +1216,6 @@ class ChatStreamingView(View):
|
|||
stream_chat_with_documents(query_str=question, documents=documents),
|
||||
content_type="text/event-stream",
|
||||
)
|
||||
response["Cache-Control"] = "no-cache"
|
||||
return response
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue