yangdx
aac787bafb
Clarify chunk tracking log message in _build_llm_context
2025-10-05 13:33:55 +08:00
yangdx
457d51952e
Add doc_name field to full docs storage
...
- Store file_path in full_docs storage
- Update PostgreSQL implementation by map file_path to doc_name
- Other storage implementation automatically handles the new field
2025-10-05 11:44:27 +08:00
yangdx
1574fec7f0
Update webui assets
2025-10-05 10:41:46 +08:00
yangdx
b5f8376756
Update webui assets
2025-10-05 09:27:38 +08:00
yangdx
dde728a32f
Bump core version to 1.5.0 and API to 0236
2025-10-05 09:25:57 +08:00
Jon
cf2a024e37
feat: Add endpoint and UI to retry failed documents
...
Add a new `/documents/reprocess_failed` API endpoint and corresponding
UI button to retry processing of failed and pending documents. This
addresses a common recovery scenario when document processing fails due
to server crashes, network errors, or LLM service outages.
Backend changes:
- Add ReprocessResponse model with status, message, and track_id fields
- Add POST /documents/reprocess_failed endpoint that triggers background
reprocessing of FAILED, PENDING, and interrupted PROCESSING documents
- Reuses existing apipeline_process_enqueue_documents for consistency
- Includes comprehensive docstring and logging for observability
Frontend changes:
- Add TypeScript types and API function for the new endpoint
- Add retry handler with intelligent polling (fast refresh → normal)
- Add "Retry Failed" button in Documents page toolbar
- Button disabled when pipeline is busy to prevent duplicate operations
- Complete i18n support (English and Chinese translations)
This feature provides a convenient way to recover from processing
failures without requiring a full filesystem rescan.
2025-10-04 16:46:29 -04:00
yangdx
b9c37bd937
Fix linting
2025-10-03 02:10:02 +08:00
yangdx
112349ed5b
Modernize type hints and remove Python 3.8 compatibility code
...
• Use collections.abc.AsyncIterator only
• Remove sys.version_info checks
• Use union syntax for None types
• Simplify string emptiness checks
2025-10-02 23:15:42 +08:00
yangdx
cec784f60e
Update webui assets
2025-10-02 22:02:42 +08:00
yangdx
a250d881f2
Update webui assets
2025-10-02 21:24:39 +08:00
yangdx
6bf6f43d96
Remove bold formatting from instruction headers in prompts
2025-10-02 00:58:03 +08:00
yangdx
bb6138e748
fix(prompt): Clarify reference section restrictions in prompt templates
2025-10-01 22:35:26 +08:00
yangdx
37e8898cf6
Simplify reference formatting in LLM context generation
...
- Remove extra newlines in reference lists
- Change code block type from text to generic
2025-10-01 22:20:58 +08:00
yangdx
f83cde14df
fix(prompt): Improve markdown formatting requirements and reference style
2025-10-01 21:41:12 +08:00
yangdx
83d99e1424
fix(OllamaAPI): Add validation to ensure last message is from user role
...
• Validate last message role is "user"
• Raise 400 error for invalid role
• Improve API request validation
• Prevent invalid message sequences
2025-10-01 20:48:37 +08:00
yangdx
df43afc89b
Relax conversation history role validation requirements
...
• Remove strict role value checking
• Allow any non-empty string roles
2025-09-29 13:10:15 +08:00
yangdx
ba216787c1
Update webui assets
2025-09-28 22:51:06 +08:00
yangdx
6e3e67fc24
Update webui assets
2025-09-28 21:34:09 +08:00
yangdx
81bc1ba025
Update webui assets and bump API version to 0235
2025-09-28 21:05:40 +08:00
yangdx
42d1d04147
Fix boolean parser problem for for LLM environment variable
...
• Add custom boolean parser for argparse in BindingOptions
2025-09-28 19:23:57 +08:00
yangdx
4957f4f017
Bump core version to 1.4.9.1
2025-09-28 15:25:02 +08:00
yangdx
978f154680
Update webui assets and bump API version to 0234
2025-09-28 15:14:05 +08:00
yangdx
0fd0186414
Improve prompt clarity by standardizing terminology and formatting
...
• Replace "Source Data" with "Context"
• Add bold formatting for key sections
• Clarify reference_id usage
• Improve JSON/text block formatting
• Standardize data source naming
2025-09-28 13:31:55 +08:00
yangdx
7cba458f22
Limit deprecated documents endpoint to 1000 records with fair distribution
2025-09-28 11:18:10 +08:00
yangdx
fcbab77613
docs: add API key usage example and security guidance
2025-09-28 10:56:52 +08:00
yangdx
2ce6a022ac
Fix documentation for user_prompt parameter in QueryParam
2025-09-27 23:41:17 +08:00
yangdx
91be53ffd2
Fix linting
2025-09-27 22:36:38 +08:00
yangdx
e0ac05db90
Simplify query route documentation and clarify conversation history
2025-09-27 22:36:16 +08:00
yangdx
f66a0aad8b
Update query streaming endpoint docs to clarify behavior
2025-09-27 22:27:49 +08:00
yangdx
3ca2165c69
Bump API version to 0233
2025-09-27 15:31:30 +08:00
yangdx
dbb0b3afb4
Fix hl_keywords and ll_keywords cache logic
...
- Remove hl_keywords and ll_keywords from keywork extracht cache
- Add hl_keywords and ll_keywords to LLM query cache
2025-09-27 15:26:52 +08:00
yangdx
e7948df541
Fix linting
2025-09-27 15:13:07 +08:00
yangdx
1766cddd6c
Fix mode parameter serialization error in Ollama chat API
...
• Use mode.value for API requests
• Add debug logging in aquery_llm
2025-09-27 15:11:51 +08:00
yangdx
81caee3498
Enhance query API with streaming control and comprehensive documentation
...
- Add stream parameter to QueryRequest
- Support non-streaming in /query/stream
- Add detailed OpenAPI response schemas
- Expand endpoint documentation
- Include usage examples and error handling
2025-09-27 11:53:31 +08:00
yangdx
f43eb00e6c
Update webui assets
2025-09-26 20:06:08 +08:00
yangdx
a528213210
Fix logging filter logic
...
• Fix boolean operator precedence in filter
• Consolidate GET/POST condition logic
2025-09-26 19:42:33 +08:00
yangdx
3ba06478a8
fix http log message order for streaming respond
...
- Move aquery_llm call outside generator
- Execute query before stream starts
2025-09-26 19:27:44 +08:00
yangdx
8cd4139cbf
refactor: fix double query problem by add aquery_llm function for consistent response handling
...
- Add new aquery_llm/query_llm methods providing structured responses
- Consolidate /query and /query/stream endpoints to use unified aquery_llm
- Optimize cache handling by moving cache checks before LLM calls
2025-09-26 19:05:03 +08:00
yangdx
862026905a
Update webui assets and bump AIP version to 0232
2025-09-26 13:15:21 +08:00
yangdx
cbdc4c4bdf
Refactor prompts and context building for better maintainability
...
- Extract context templates to PROMPTS
- Unify token calculation logic
- Simplify user_prompt formatting
- Reduce code duplication
- Improve prompt structure consistency
2025-09-26 12:39:06 +08:00
yangdx
fba2356c81
Move user_prompt to system prompt
...
- Refactor query prompt handling to separate user prompts in system context
- Simplify user_query to only contain query
- Apply changes to both kg_query and naive_query
2025-09-26 10:02:01 +08:00
yangdx
058ce83dba
Clarify citation format and fix typo
2025-09-25 20:08:55 +08:00
yangdx
b6b4baff21
Update webui assets
2025-09-25 19:05:51 +08:00
yangdx
2a4c12cc56
Update webui assets
2025-09-25 18:01:49 +08:00
yangdx
9e59339110
Bump API version to 0231
2025-09-25 16:57:13 +08:00
yangdx
b848ca49e6
Fix linting
2025-09-25 16:22:00 +08:00
yangdx
b08b8a6a6a
Add reference list support to query API endpoints with unified result handling
...
• Add include_references param to QueryRequest
• Extend QueryResponse with references field
• Create unified QueryResult data structures
• Refactor kg_query and naive_query functions
• Update streaming to send references first
2025-09-25 16:21:42 +08:00
yangdx
6e3aa2092b
Update webui assets and bump API version to 0230
2025-09-25 06:28:18 +08:00
yangdx
699ca3ba00
Remove deprecated history_turns and ids parameters from query API endpoint
...
• Update QueryParam documentation
• Mark history_turns as deprecated
• Clean up splash screen display
• Clarify conversation_history usage
2025-09-25 04:58:57 +08:00
yangdx
41a6da6786
Remove inline citation instructions from prompt templates
...
- Remove footnote syntax guidelines
- Delete inline citation examples
- Keep references section format
- Simplify citation documentation
- Update example section titles
2025-09-25 03:46:30 +08:00