Fixed
- ⚡️(front) performance improvements on chat input
- 💄(front) i18n and standardize pdf parsing display
Removed
- 🔥(chat) consider PDF documents as other kind of documents #234
Wrap document_store.parse_and_store_document() calls with
asyncio.to_thread() to prevent blocking the event loop.
Previously, synchronous document parsing (e.g., PDF) blocked the
event loop, preventing keepalive messages from being sent and
causing nginx timeouts in production
Signed-off-by: Laurent Paoletti <lp@providenz.fr>
Vulnerability in jaraco.context caused security issue
in setuptools and python3. change python version to fix
see GHSA-58pv-8j8x-9vj2
The CVE is not actionable, anyway, we want to please
trivy.
We remove the specific management for PDF because it introduces:
- limitation regarding the LLM we can use
- bad behavior when uploading huge PDFs
- more code complexity
while not providing really actionnable improvements.
This commit removes this, to keep a better control over this.
- Auto-generate title via LLM after reaching user message threshold
- Add title_set_by_user_at field to track user-customized titles
- Skip auto-generation when user has set a custom title
- Stream conversation_metadata event to frontend on title update
- Invalidate React Query cache to refresh conversation list
Signed-off-by: Laurent Paoletti <lp@providenz.fr>
We want to enable the OSS model but seems like it returns
thinking values twice and we don't manage it well...
So we disable the frontend while we still don't know
how to display the thinking stuff.
We could have also cleaned the backend while unused.
Pydantic AI allows setting multiple static and dynamic system prompts
to define conversation context and rules. Previously, these were sent
to the model API as separate messages, which caused compatibility
issues with some self-hosted models (e.g., Gemma3/vLLM).
This commit switches from using `system_prompt` to `instruction` as
recommended in the Pydantic AI documentation, thus merging several
instructions into a single message.
Reference: https://ai.pydantic.dev/agents/#system-prompts
Signed-off-by: Laurent Paoletti <lp@providenz.fr>
Inside the docker images, trivy does not detect frontend issues,
we run trivy here to have the lock files.
This does not work well for python packages.
We use langfuse to know the model use for product analysis
and token consumption. Before this commit if the user does
not want to share their conversations, we would not know
their token use. Now we send a trace with redacted content:
the input/output is redacted and the tool call arguments
are removed from the trace.
When the tool is called, the agent graph call the LLM again with
the tool response, and the instructions. I hope using instruction
here will provide better results.
The former way to add the summarize tool as output does not work
properly with Mistral:
- if the user ask for a summary, the tool is called and the
result is returned directly
- then if there is another user request which does not trigger
a tool: boom, there is a JSON encode error...
I was not able to understand why this happens, so for now, the
summarize tool is not an "output".
This reduces the code complexity while allowing better "cuts"
also providing overlap for free.
Also, do not wait for sub-batch to complete a use a global
concurrency instead.