Commit Graph

7 Commits

Author SHA1 Message Date
Trenton H bb860a5834 Fix: Improvements for security around the AI (#12895)
* Fix: Validate and limit chat question input in ChatStreamingView

Add max_length=4000 to ChatStreamingSerializer.q and replace the bare
request.data["q"] read with proper serializer.is_valid(raise_exception=True)
so oversized or missing questions are rejected with HTTP 400 before
reaching the LLM.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix: Add defensive prompt framing to mark document content as untrusted

* Also adds a system prompt which is treated higher that this is untrusted stuff

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-01 10:03:27 -07:00
shamoon 4ce5f2022c Fix (beta): better catch chat errors (#12854) 2026-05-26 19:05:47 +00:00
shamoon ab47185712 Performance (beta): dont re-build vector index with each chat (#12847) 2026-05-26 11:36:05 -07:00
shamoon 57b91ad2cf Fix: use response synthesizer for RAG doc chat (#12751) 2026-05-08 20:01:44 +00:00
shamoon 354df34e47 Enhancement: chat message document links (#12670) 2026-04-28 13:00:20 -07:00
Trenton H f5c0c21922 Chore: Lazy imports of the heavy AI modules (#12275) 2026-03-07 12:53:22 -08:00
shamoon e940764fe0 Feature: Paperless AI (#10319) 2026-01-13 16:24:42 +00:00