Commit graph

1169 commits

Author SHA1 Message Date
yangdx
8a0098996c Update webui assets 2025-10-12 03:13:43 +08:00
yangdx
e1af1c6d14 Update webui assets 2025-10-12 02:51:22 +08:00
yangdx
f402ad276c Bump API version to 0238 2025-10-12 02:05:09 +08:00
yangdx
289337b2c8 Bump API version to 0237 2025-10-11 13:45:29 +08:00
yangdx
a5c05f1b92 Add offline deployment support with cache management and layered deps
• Add tiktoken cache downloader CLI
• Add layered offline dependencies
• Add offline requirements files
• Add offline deployment guide
2025-10-11 10:28:14 +08:00
yangdx
12facac506 Enhance graph API endpoints with detailed docs and field validation
- Remove redundant README section
- Add Pydantic field validation
- Expand endpoint docstrings
- Include request/response examples
- Document merge operation benefits
2025-10-10 12:49:00 +08:00
yangdx
85d1a563b3 Merge branch 'adminunblinded/main' 2025-10-10 12:31:47 +08:00
NeelM0906
b7c77396a0 Fix entity/relation creation endpoints to properly update vector stores
- Changed create_entity to use rag.acreate_entity() instead of direct graph manipulation
  - Changed create_relation to use rag.acreate_relation() instead of direct graph manipulation
  - This ensures vector embeddings are created and entities/relations are searchable
  - Adds proper concurrency locks and metadata population
2025-10-09 17:02:17 -04:00
NeelM0906
f6d1fb98ac Fix Linting errors 2025-10-09 16:52:22 -04:00
NeelM0906
9f44e89de7 Add knowledge graph manipulation endpoints
Added three new REST API endpoints for direct knowledge graph manipulation:

- POST /graph/entity/create: Create new entities in the knowledge graph
- POST /graph/relation/create: Create relationships between entities
- POST /graph/entities/merge: Merge duplicate/misspelled entities while preserving relationships

The merge endpoint is particularly useful for consolidating entities discovered after document processing, fixing spelling errors, and cleaning up the knowledge graph. All relationships from source entities are transferred to the target entity, with intelligent handling of duplicate relationships.

Updated API documentation in lightrag/api/README.md with usage examples for all three endpoints.
2025-10-08 15:59:47 -04:00
yangdx
d473f635d8 Update webui assets 2025-10-05 14:02:18 +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
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
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
978f154680 Update webui assets and bump API version to 0234 2025-09-28 15:14:05 +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
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
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
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
625e4c686c Update webui assets 2025-09-25 01:49:35 +08:00
yangdx
09bdf2c028 Update webui assets 2025-09-25 00:18:39 +08:00
yangdx
1381575db8 Update webui assets 2025-09-24 23:29:00 +08:00
yangdx
7aeeaa56a8 Update webui assets 2025-09-24 23:12:25 +08:00
yangdx
2208151b82 Update webui assets 2025-09-24 22:32:31 +08:00
yangdx
810493b7c9 Update webui assets and bump API version to 0229 2025-09-24 22:16:59 +08:00