Spaces:
Running
Running
Commit History
-
Rebuild Thinking Mode as a real tool-calling ReAct agent, add Docling PDF fallback
ReAct agent rewrite (app/services/rag.py): - Replace the hand-rolled text-parsing ReAct loop with langchain.agents.create_agent, using real registered tools (vector_search, graph_search, clarify) instead of describing them as plain text and regex-parsing "Action:" lines - This fixes the recurring crash where gpt-oss models spontaneously emit a native tool call against the old text-only prompt, which the API rejected outright - Fallback across Groq models now uses Runnable.with_fallbacks() with tools bound throughout the chain, so a failing model is retried without losing tool-calling - Rewrote test_clarification.py's ReAct-dependent tests to mock at the create_agent boundary and assert on real tool registration, instead of mocking llm_invoke and checking for old text-prompt syntax that no longer exists Docling PDF fallback (app/services/ingestion.py, Dockerfile, scripts/): - Add Docling as a fallback parser when LiteParse fails or returns no extractable text (e.g. scanne…6e193ae