Commit graph

2993 commits

Author SHA1 Message Date
Max
682bd75889
Merge pull request #1129 from trheyi/main
Enhance job management functionality and improve execution handling
2025-08-31 15:39:05 +08:00
Max
4dd1424080 Enhance job management functionality and improve execution handling
- Implemented comprehensive job management features, including pagination for job listing, active job retrieval, and job counting.
- Enhanced job saving logic to support both creation and updates, ensuring proper handling of job metadata.
- Introduced category management with automatic creation and retrieval of categories during job operations.
- Added execution management capabilities, including progress tracking and logging for job executions.
- Improved error handling and validation across job and execution methods, ensuring robustness in job processing.
- Updated documentation to reflect new features and usage examples for job management and execution tracking.
2025-08-31 15:38:32 +08:00
Max
011b10f6f2
Merge pull request #1128 from trheyi/main
Implement job management functionality and update job model
2025-08-31 12:00:04 +08:00
Max
38f86aa77b Implement job management functionality and update job model
- Added new job management functions: Once, Cron, and Daemon for creating jobs with different scheduling types.
- Introduced methods for job manipulation, including Start, Cancel, and various setters for job properties.
- Updated job model to reflect changes in the job execution process type, renaming "process_type" to "mode" and adjusting enum values to uppercase.
- Removed obsolete interfaces and types related to job management, streamlining the codebase.
2025-08-31 11:59:16 +08:00
Max
b5ef9b7111
Merge pull request #1127 from trheyi/main
Add job-related models to bindata and update system models
2025-08-30 17:43:31 +08:00
Max
1664355401 Add job-related models to bindata and update system models
- Added new models for job management: category, execution, job, and log.
- Updated bindata.go to include paths for the new job models.
- Modified model.go and utils.go to register the new job models in system and test mappings, ensuring they are accessible in the application.
2025-08-30 17:43:08 +08:00
Max
e525dd29e0
Merge pull request #1126 from trheyi/main
Refactor document and collection update processes to include GraphRag…
2025-08-30 09:39:46 +08:00
Max
ae965d0b32 Refactor document and collection update processes to include GraphRag synchronization
- Updated AddFileProcess, AddTextProcess, and AddURLProcess functions to use new UpdateDocumentCountWithSync method for document count updates, ensuring synchronization with GraphRag.
- Enhanced CreateCollection function to utilize UpdateCollectionWithSync for collection status updates, improving consistency in metadata management.
- Modified RemoveDocs function to sync document count updates to GraphRag, ensuring accurate tracking of affected collections.
- Introduced new utility functions for updating collections and document counts with GraphRag synchronization, enhancing overall API functionality.
2025-08-30 09:39:16 +08:00
Max
1555c56579
Merge pull request #1125 from trheyi/main
Enhance collection and document management in API
2025-08-29 18:03:04 +08:00
Max
28bbed7908 Enhance collection and document management in API
- Introduced readonly field for collections and documents to indicate if they are read-only.
- Updated ListCollections endpoint to support pagination and filtering by various parameters, including keywords, status, and system flags.
- Enhanced query capabilities with dynamic field selection and sorting options for collections.
- Refactored GetCollections to ListCollections for improved clarity in functionality.
- Updated API response structures to reflect new filtering and sorting features, ensuring better data access and management.
2025-08-29 18:02:37 +08:00
Max
31e4d291ee
Merge pull request #1124 from trheyi/main
Implement document and collection count updates in API
2025-08-29 17:35:02 +08:00
Max
96eef9e27d Implement document and collection count updates in API
- Added DocumentCount and UpdateDocumentCount methods to manage document counts in collections, enhancing metadata accuracy.
- Introduced RemoveDocumentsByCollectionID method for bulk document removal, improving collection management.
- Updated AddFileProcess, AddTextProcess, and AddURLProcess functions to include document and segment count updates after file operations.
- Enhanced RemoveCollection function to report the number of documents removed during collection deletion.
- Implemented segment count updates in RemoveSegments and RemoveSegmentsByDocID functions, ensuring accurate tracking of document segments.
2025-08-29 17:34:09 +08:00
Max
02c3904bd4
Merge pull request #1123 from trheyi/main
Update segment graph API to include entity-based relationship retrieval
2025-08-29 11:51:12 +08:00
Max
0252e58b04 Update segment graph API to include entity-based relationship retrieval
- Enhanced GetSegmentGraph function to retrieve segment entities and relationships based on query parameters, improving data access.
- Introduced new endpoint GetSegmentRelationshipsByEntities for fetching relationships connected to entities, with appropriate error handling.
- Updated response structures to reflect counts and types of queries used, ensuring clarity in API responses.
- Modified go.mod and go.sum to update the dependency for github.com/ulikunitz/xz to version 0.5.14.
2025-08-29 11:50:14 +08:00
Max
53e318c521
Merge pull request #1122 from trheyi/main
Enhance segment graph and entity retrieval in API
2025-08-25 11:02:58 +08:00
Max
bc85518bc3 Enhance segment graph and entity retrieval in API
- Implemented new endpoints for retrieving segment entities and relationships, improving data access for clients.
- Added error handling for missing document and segment IDs, ensuring robust validation in GetSegmentEntities and GetSegmentRelationships functions.
- Enhanced GetSegmentGraph function to support filtering options for entities and relationships, allowing for more flexible responses.
- Updated response structures to include counts for entities and relationships, improving clarity in API responses.
2025-08-25 11:01:54 +08:00
Max
701265d5cb
Merge pull request #1121 from trheyi/main
Implement segment retrieval enhancements in API
2025-08-24 10:26:53 +08:00
Max
5f217bcd33 Implement segment retrieval enhancements in API
- Added error handling for segment not found and access denied scenarios in GetSegmentParents function.
- Implemented response formatting based on query parameters, including metadata options.
- Introduced formatSegmentTreeResponse function to structure segment data for API responses.
- Improved validation to ensure segments belong to the specified document, enhancing security and clarity in responses.
2025-08-24 10:26:06 +08:00
Max
61a2765977
Merge pull request #1119 from trheyi/main
Implement hit and vote management enhancements in API
2025-08-22 11:28:51 +08:00
Max
9587cbf981 Enhance hit and vote retrieval logic in API
- Implemented error handling for uninitialized knowledge base in GetHit and GetVote functions.
- Added detailed error responses for cases where hits or votes are not found.
- Updated response structures to return the retrieved hit and vote data along with associated identifiers.
2025-08-22 11:25:46 +08:00
Max
82b11caa42 Implement hit and vote management enhancements in API
- Added error handling for uninitialized knowledge base in hit and vote endpoints.
- Implemented ScrollHits and ScrollVotes methods to retrieve paginated results with filtering options.
- Updated AddHits and AddVotes functions to handle request validation and response formatting.
- Enhanced response structures to include updated counts for added and removed hits and votes.
- Introduced new request types for updating hits and votes, allowing for default reactions in segments.
2025-08-22 11:18:04 +08:00
Max
f9b87555c8
Merge pull request #1118 from trheyi/main
Remove debug print statements from UpdateSegments function to clean u…
2025-08-21 16:44:10 +08:00
Max
58626f4fa9 Remove debug print statements from UpdateSegments function to clean up code and improve readability. 2025-08-21 16:43:17 +08:00
Max
d4d19cfe60
Merge pull request #1117 from trheyi/main
Refactor document ID handling in API responses
2025-08-21 11:11:36 +08:00
Max
5ea5c7835d Refactor document ID handling in API responses
- Updated API response structures across multiple endpoints to replace `document_id` with `doc_id` for consistency.
- Enhanced error handling in segment retrieval to ensure proper validation of document ownership.
- Improved response clarity by ensuring all relevant endpoints reflect the updated field naming convention.
2025-08-21 11:10:13 +08:00
Max
c92f84c41c
Merge pull request #1116 from trheyi/main
Refactor segment extraction functions and update API routes
2025-08-21 09:12:22 +08:00
Max
faafa4f90e Refactor segment extraction functions and update API routes
- Renamed segment extraction functions to better reflect their purpose, changing `ExtractSegmentEntities` to `ExtractSegmentGraph` and `ExtractSegmentEntitiesAsync` to `ExtractSegmentGraphAsync`.
- Updated API routes to use the new function names for segment extraction, enhancing clarity and consistency.
- Introduced new request structures for batch updates of scores and weights, improving the API's capabilities for segment management.
- Removed the outdated `store.go` file to streamline the codebase.
2025-08-21 09:08:14 +08:00
Max
1714f47c48
Merge pull request #1115 from trheyi/main
Refactor API routes for collections and segments management
2025-08-21 08:49:26 +08:00
Max
c3abc84057 Refactor API routes for collections and segments management
- Rearranged and updated API endpoints for collections, including adding GetCollections and adjusting the order of operations for better clarity.
- Enhanced segment management by introducing new endpoints for segment scores, weights, and votes, along with async operations for adding and updating segments.
- Improved error handling for missing document IDs in segment-related functions, ensuring robust validation.
- Streamlined response structures to include document and segment IDs in relevant endpoints, enhancing the API's usability.
2025-08-21 08:48:17 +08:00
Max
1b7fd2f4d5
Merge pull request #1114 from trheyi/main
Enhance collection management and segment handling in the API
2025-08-20 18:27:32 +08:00
Max
91d67d3b54 Enhance collection management and segment handling in the API
- Added GetCollection endpoint to retrieve collections by ID, including error handling for missing IDs and uninitialized knowledge base.
- Updated CreateCollectionConfig to use more descriptive field names for embedding provider and option IDs.
- Refactored UpdateSegments function to improve validation and error handling, ensuring document IDs and segment texts are properly checked.
- Introduced new request structures for updating votes, scores, and weights for segments, enhancing the API's capabilities.
- Removed the outdated vote handling file to streamline the codebase.
2025-08-20 18:25:28 +08:00
Max
6fa46be875
Merge pull request #1113 from trheyi/main
Refactor segment handling to improve pagination and endpoint clarity
2025-08-15 16:44:31 +08:00
Max
c4c598db35 Refactor segment handling to improve pagination and endpoint clarity
- Replaced ListSegments function with ScrollSegments to implement iterator-style pagination.
- Updated related comments and error messages to reflect the new scrolling functionality.
- Streamlined API routes by removing the redundant ListSegments endpoint, enhancing overall clarity.
2025-08-15 16:43:22 +08:00
Max
3e41b8f499
Merge pull request #1112 from trheyi/main
Implement pagination and filtering in ListSegments function
2025-08-15 15:48:53 +08:00
Max
451569e8cb Implement pagination and filtering in ListSegments function
- Enhanced ListSegments function to support pagination with customizable limit and offset parameters.
- Added error handling for missing docID and uninitialized knowledge base instance.
- Introduced filtering options for score, weight, and vote, allowing for refined segment retrieval.
- Improved response structure to return success or error messages based on the operation outcome.
2025-08-15 15:47:21 +08:00
Max
2ba574e9df
Merge pull request #1111 from trheyi/main
Enhance document management by adding file ID support and updating re…
2025-08-15 10:59:36 +08:00
Max
57082d1d42 Enhance document management by adding file ID support and updating related fields
- Introduced `file_id` field in the document model to link documents with their corresponding files in the attachment system.
- Updated `AddFileProcess` to include `file_id` in the response, improving document tracking.
- Modified `GetDocument` function to support the new `file_id` field in document retrieval.
- Removed the unused `ScrollDocuments` endpoint to streamline the API.
- Improved error handling and response structure for document-related operations.
2025-08-15 10:47:06 +08:00
Max
b5d0eae3dc
Merge pull request #1110 from trheyi/main
Implement pagination and filtering for document listing in ListDocume…
2025-08-14 17:11:53 +08:00
Max
d51874abb3 Implement pagination and filtering for document listing in ListDocuments function
- Enhanced ListDocuments function to support pagination with customizable page size and sorting options.
- Added filtering capabilities for keywords, tags, collection IDs, and status, allowing for more refined document retrieval.
- Introduced validation for requested fields and sorting parameters to ensure only valid options are processed.
- Improved error handling for document search operations, returning appropriate error responses when necessary.
2025-08-14 17:11:12 +08:00
Max
67eb0b834d
Merge pull request #1109 from trheyi/main
Refactor file, text, and URL addition processes to improve request ha…
2025-08-14 14:54:34 +08:00
Max
3bef5a6222 Refactor file, text, and URL addition processes to improve request handling and validation
- Updated AddFileProcess, AddTextProcess, and AddURLProcess functions to accept an optional job ID for async operations.
- Enhanced error handling by requiring document IDs to be provided by the caller before processing.
- Streamlined document creation and upsert operations, ensuring better validation and rollback mechanisms.
- Implemented async processing capabilities in AddFileAsync, AddTextAsync, and AddURLAsync functions, returning job IDs and document IDs in responses.
- Improved code maintainability and readability by encapsulating business logic and reducing dependencies on Gin context.
2025-08-14 14:51:48 +08:00
Max
570b544cf1
Merge pull request #1108 from trheyi/main
Update chunking options in tests to reflect new defaults and structure
2025-08-14 13:56:14 +08:00
Max
2ebf73fce0 Update chunking options in tests to reflect new defaults and structure
- Changed MaxConcurrent from 10 to 1 in test cases to align with updated configuration.
- Added new properties: Separator and EnableDebug, with default values set in tests.
- Refactored semantic options handling to include Connector and Toolcall properties, ensuring correct defaults are validated in tests.
- Enhanced test structure for semantic properties to improve clarity and maintainability.
2025-08-14 13:55:40 +08:00
Max
7795aae998
Merge pull request #1107 from trheyi/main
Update asset modification timestamps and enhance chunking options configuration
2025-08-14 10:19:58 +08:00
Max
ec91fca5c9 Remove debug print statements from ToUpsertOptions method in BaseUpsertRequest to clean up code and improve readability. 2025-08-14 10:18:21 +08:00
Max
b2f0ef2a67 Update asset modification timestamps and enhance chunking options configuration
- Updated modification timestamps for various asset files to reflect recent changes.
- Modified chunking options to include new parameters: Separator and EnableDebug, with default values set.
- Enhanced the Options method in Structured and Semantic providers to handle additional properties from the option map, improving flexibility in configuration.
- Added new fields in the document model for converter and fetcher option IDs, allowing for better integration with provider configurations.
2025-08-14 10:06:05 +08:00
Max
e74b0e6b45
Merge pull request #1106 from trheyi/main
Refactor file, text, and URL addition handlers for improved request p…
2025-08-14 08:53:24 +08:00
Max
7b2534bf37 Refactor file, text, and URL addition handlers for improved request processing and validation
- Introduced separate processing functions (AddFileProcess, ProcessAddTextRequest) to encapsulate business logic for file and text additions, making them Gin-agnostic.
- Updated AddFile, AddText, and AddURL functions to handle request parsing and validation more effectively.
- Enhanced error handling and rollback mechanisms during document creation and upsert operations.
- Implemented async processing capabilities for AddFileAsync, AddTextAsync, and AddURLAsync functions using pre-parsed request data.
- Streamlined utility functions for preparing requests and validating input, improving code maintainability and readability.
2025-08-14 08:52:43 +08:00
Max
27135ebbc0
Merge pull request #1105 from trheyi/main
Implement document management handlers for listing, retrieving, and r…
2025-08-14 07:44:39 +08:00
Max
40510ec208 Implement document management handlers for listing, retrieving, and removing documents
- Added ListDocuments and ScrollDocuments functions for paginated document retrieval.
- Implemented GetDocument function to fetch document details by ID, including error handling for missing IDs.
- Introduced RemoveDocs function to handle document deletion requests.
- Removed outdated AddFile, AddText, and AddURL functions to streamline document management logic.
2025-08-14 07:44:07 +08:00