Commit graph

2371 commits

Author SHA1 Message Date
Max
68e4e64e35 Add KnowledgeFilter struct and update database configuration in README
- Changed the database configuration example from 'app.yao' to 'neo.yml' for clarity.
- Introduced the KnowledgeFilter struct to facilitate filtering of knowledge collections by various criteria such as user ID, collection name, public status, and pagination.
- Added usage examples for retrieving system and readonly knowledge collections with specific fields.
2025-06-01 16:44:02 +08:00
Max
e1f2899723 Add attachment status management and filtering in neo package
- Introduced new status field in the attachment table to track processing states: uploading, uploaded, indexing, indexed, upload_failed, and index_failed.
- Added progress and error fields to provide detailed information during the attachment processing workflow.
- Implemented AttachmentFilter struct to support filtering attachments by status.
- Updated SaveAttachment and GetAttachments methods to handle new status and progress information.
- Enhanced tests to validate attachment status management and filtering functionality.
2025-06-01 16:26:39 +08:00
Max
49562b8be0 Add attachment and knowledge management features in neo package
- Implemented SaveAttachment, DeleteAttachment, GetAttachments, and GetAttachment methods for managing file attachments.
- Introduced SaveKnowledge, DeleteKnowledge, GetKnowledges, and GetKnowledge methods for handling knowledge collections.
- Enhanced the Store interface to include methods for attachment and knowledge management.
- Updated tests to cover new attachment and knowledge functionalities, ensuring robust validation and error handling.
2025-06-01 16:06:41 +08:00
Max
2222bbfcd7 Refactor file upload handling in neo package
- Simplified the file header conversion process by introducing GetHeader function to streamline header management during uploads.
- Updated handleUpload method to utilize the new GetHeader function, improving code clarity and reducing error handling complexity.
- Enhanced test cases to reflect changes in upload logic and ensure accurate content validation.
- Improved chunked upload handling by implementing a more robust mechanism for tracking upload progress and managing chunk data.
2025-06-01 12:00:45 +08:00
Max
5b99f3bf44 Enhance file upload functionality and authentication in neo package
- Updated the API to support dynamic storage paths for file uploads, allowing for differentiated handling of chat, knowledge, and asset uploads.
- Implemented comprehensive authentication checks to ensure only authorized users can upload files.
- Introduced new upload options to handle original filenames and improved error responses for better user feedback.
- Enhanced CORS headers to accommodate new upload requirements and improve API security.
- Initialized authentication settings in the Load function to streamline user management.
2025-05-31 16:36:02 +08:00
Max
43686be6e4 Enhance asset upload management in neo package
- Added support for custom asset upload settings in the Upload struct, allowing for more flexible file handling.
- Implemented logic in initUpload to register default or custom asset upload configurations based on user settings.
- Improved error handling during asset registration to ensure robust functionality.
2025-05-31 13:33:23 +08:00
Max
a9b6eed025 Add upload management to neo package for enhanced file handling
- Introduced initUpload function to initialize upload settings for chat and knowledge attachments.
- Updated Upload struct to include specific settings for chat and knowledge uploads.
- Implemented RegisterDefault and ReplaceEnv methods in the attachment manager for better configuration management.
- Enhanced error handling during the upload initialization process to ensure robust functionality.
2025-05-31 11:30:11 +08:00
Max
96d2f22e77 Update dependencies in go.mod and go.sum; refactor file handling in neo package
- Added the jsonrepair package to go.mod for enhanced JSON handling capabilities.
- Removed unused dependencies from go.mod and updated existing ones for better performance.
- Refactored file upload and download methods in the neo package to return nil values, indicating a temporary placeholder for future implementation.
- Updated the Message struct to use the new attachment package for better organization of file attachments.
2025-05-31 10:07:19 +08:00
Max
c638d7e7c2 Refactor menu processing logic to improve error handling and streamline argument management
- Simplified argument handling for the menu process by removing unnecessary checks and directly appending locale to args.
- Enhanced error handling by ensuring that the menu process is required and throwing exceptions with appropriate status codes.
- Refactored the processMenu function to utilize a handle for executing the menu process, improving clarity and error management.
2025-05-27 12:39:39 +08:00
Max
b97933e357 Refactor Assistant struct to replace Flows with Workflow and update cloning logic
- Replaced the Flows field in the Assistant struct with a Workflow field to better represent the assistant's functionality.
- Updated the Clone method to perform a deep copy of the Workflow instead of Flows.
- Adjusted related test cases to reflect the changes in the Assistant struct and ensure proper functionality.
2025-05-27 12:07:41 +08:00
Max
1058598be3 Enhance localization support in chat and assistant functionalities
- Added locale parameter to GetChats, GetChat, and GetAssistants methods across various store implementations for improved localization.
- Updated handleChatList, handleChatLatest, and handleChatDetail functions to utilize the new locale handling for better user experience.
- Refactored assistant methods to support localized names and descriptions based on user input.
- Introduced WithLocale function in context to manage locale settings effectively.
2025-05-27 11:49:19 +08:00
Max
4ab7a1056e Enhance localization support and refactor assistant functions for improved i18n handling
- Introduced locale parameter in GetAssistants and GetAssistant methods across various store implementations to support localized responses.
- Updated handleChatLatest, handleAssistantList, handleAssistantDetail, and handleAssistantTags functions to utilize the new locale handling for better user experience.
- Refactored GetPlaceholder method in the Assistant struct to accept a locale argument for dynamic placeholder translations.
- Removed redundant i18n code and centralized translation logic for cleaner implementation.
2025-05-26 11:58:48 +08:00
Max
b424f13ddc Update system time message format in API response
- Changed the system time message to include a name field and a more descriptive content format for clarity.
- Added a development log comment for the DUI platform to enhance code documentation.
2025-05-25 11:34:44 +08:00
Max
1b921cf7b0 Enhance i18n support and refactor API response handling in assistant functions
- Introduced global i18n initialization and connector setup in the Load function for better localization support.
- Refactored handleAssistantList, handleAssistantDetail, and handleAssistantTags functions to utilize the new Translate method for improved response translation based on user locale.
- Simplified locale handling by removing redundant code and centralizing translation logic.
2025-05-25 10:51:02 +08:00
Max
6467a9c37e Refactor API response handling and enhance locale support in assistant functions
- Removed the generateResponse struct and its associated methods to simplify response handling.
- Added locale support in handleAssistantList and handleAssistantDetail functions to allow for localized responses based on user input.
- Updated the Context struct to include locale information for better customization.
- Refactored the Load function in load.go to incorporate i18n support for assistant localization.
2025-05-24 20:36:00 +08:00
Max
c087ed1760 Remove hooks.go file and refactor Load function in load.go to streamline assistant initialization
- Deleted hooks.go as it was no longer needed.
- Updated Load function in load.go to set default assistant name to "mohe" and adjusted store settings.
- Removed unused RAG and Vision initialization functions to simplify the codebase.
- Refactored defaultAssistant function to improve error handling for missing default assistant.
2025-05-24 18:37:51 +08:00
Max
ea053856c9 Refactor import statements in main.go for improved organization
- Reorganized import statements in main.go to enhance readability.
- Removed unused fmt import and added cmd and utils imports back for proper functionality.
2025-05-22 23:21:08 +08:00
Max
0d612753e7 Update dependencies in go.mod and go.sum; refactor imports in main.go and utils.go
- Updated various dependencies in go.mod to their latest versions for improved functionality and security.
- Refactored import statements in main.go to enhance readability and organization.
- Changed the jsonrepair package import in utils.go to use a different library for better performance.
2025-05-22 23:20:11 +08:00
Max
9a0ad73f4c Enhance Context struct by adding Locale and Theme fields
- Introduced Locale and Theme fields to the Context struct for improved customization options.
- Updated the Map method to include these new fields in the returned data.
2025-05-19 18:15:36 +08:00
Max
cf3253b60e
Merge pull request #966 from trheyi/main
Update AWS CLI version in Dockerfile and add version check in build-l…
2025-05-18 19:15:19 +08:00
Max
e4b4e50c9f Update AWS CLI version in Dockerfile and add version check in build-linux workflow 2025-05-18 19:14:33 +08:00
Max
d158ec9e50
Update build-linux.yml 2025-05-18 18:50:14 +08:00
Max
fb49ca41cd
Merge pull request #965 from trheyi/main
chore: Update S3 copy command in build-linux workflow to disable chec…
2025-05-18 18:45:44 +08:00
Max
aaf93f0240 chore: Update S3 copy command in build-linux workflow to disable checksums
- Modified the S3 copy command in the build-linux.yml workflow to set AWS_S3_DISABLE_CHECKSUMS to true, improving upload performance and consistency.
2025-05-18 18:45:07 +08:00
Max
6729b5f1d8
Merge pull request #964 from trheyi/main
chore: Remove --no-checksum-validation option from S3 copy command in…
2025-05-18 18:21:42 +08:00
Max
e1780db83b chore: Remove --no-checksum-validation option from S3 copy command in build-linux workflow
- Updated the S3 copy command in the build-linux.yml workflow to remove the --no-checksum-validation option, reverting to the previous behavior for consistency in file uploads.
2025-05-18 18:21:10 +08:00
Max
d436da3c6e
Merge pull request #963 from trheyi/main
chore: Add --no-checksum-validation option to S3 copy command in buil…
2025-05-18 18:08:51 +08:00
Max
dcf3e7ef76 chore: Add --no-checksum-validation option to S3 copy command in build-linux workflow
- Updated the S3 copy command in the build-linux.yml workflow to include the --no-checksum-validation option for improved performance during file uploads.
2025-05-18 18:08:03 +08:00
Max
19ddc4150b
Merge pull request #962 from trheyi/main
chore: Rename XGen to CUI in macOS build workflow
2025-05-18 18:00:23 +08:00
Max
e7ac051d88 chore: Rename XGen to CUI in macOS build workflow
- Updated references in the build-macos.yml workflow to replace XGen with CUI.
- Adjusted file movements and cleanup commands to reflect the new naming convention for consistency.
2025-05-18 17:59:54 +08:00
Max
603cf5a180
Merge pull request #961 from trheyi/main
chore: Update version and Go installation in CI workflows
2025-05-18 17:58:00 +08:00
Max
4dbdb07efb chore: Update version and Go installation in CI workflows
- Bumped the version from 0.9.0 to 0.10.5 in the macOS build workflow.
- Updated the Go installation in the Dockerfile from version 1.24.0 to 1.24.3 for improved compatibility and features.
2025-05-18 17:57:21 +08:00
Max
7c4a6f585c
Merge pull request #960 from trheyi/main
chore: Update .gitignore and Makefile for improved artifact management
2025-05-18 17:37:57 +08:00
Max
eeac6bbf96 chore: Update .gitignore and Makefile for improved artifact management
- Added backup entries for bindata.go and const.go in .gitignore to prevent accidental commits.
- Refactored Makefile to streamline CUI commit retrieval and ensure consistent versioning in artifact generation.
- Implemented backup and restoration of bindata.go and const.go during the release process for better safety.
2025-05-18 17:37:28 +08:00
Max
18db28247c
Merge pull request #959 from trheyi/main
feat: Update versioning and commit information in Makefile and versio…
2025-05-18 16:47:58 +08:00
Max
4c026755c4 feat: Update versioning and commit information in Makefile and version command
- Added CUI commit information to the Makefile for artifact generation.
- Enhanced version command output to include Yao and CUI commit details with improved formatting.
- Updated constant names in share/const.go for clarity on versioning.
- Fixed references to CUI commit in process and app files to align with new naming conventions.
2025-05-18 16:47:32 +08:00
Max
4ffc2d559b
Merge pull request #958 from trheyi/main
⚠️ BREAKING: Rename XGen to CUI and update license terms
2025-05-18 12:17:12 +08:00
Max
f55fc7b374 ⚠️ BREAKING: Rename XGen to CUI and update license terms
1. Major Changes:
   - Migrate all XGen references to CUI
   - Update project naming conventions across codebase

2. License Updates:
   - Revise open source license terms
   - Update copyright and usage conditions

This is a breaking change that requires updates in dependent projects.
2025-05-18 12:16:45 +08:00
Max
bdd69637d9
Merge pull request #957 from trheyi/main
chore: Update Go version in CI workflows to 1.24
2025-05-18 10:20:34 +08:00
Max
42e5e5ecdb chore: Update Go version in CI workflows to 1.24
- Updated the Go version in both `pr-test.yml` and `unit-test.yml` workflows from 1.23 to 1.24 to ensure compatibility with the latest features and improvements.
2025-05-18 10:19:19 +08:00
Max
fc345da85e
Merge pull request #956 from trheyi/main
refactor: Simplify sheet dimension retrieval in Excel processing
2025-05-15 13:03:49 +08:00
Max
c357c72934 refactor: Simplify sheet dimension retrieval in Excel processing
- Replaced the previous method of calculating sheet dimensions with a more efficient approach using the `Cols` method.
- Removed commented-out code related to dimension handling, streamlining the function for better readability and maintainability.
2025-05-15 13:02:13 +08:00
Max
74db0d9a53
Merge pull request #955 from trheyi/main
feat: Add row reading and dimension retrieval functionalities for Exc…
2025-05-15 12:56:53 +08:00
Max
1cce634d24 feat: Add row reading and dimension retrieval functionalities for Excel sheets
- Implemented `excel.sheet.rows` to read specified rows from a sheet with pagination support.
- Added `excel.sheet.dimension` to retrieve the number of rows and columns in a sheet.
- Enhanced the Excel processing logic to handle new functionalities and updated related tests.
- Updated README with examples for the new features.
2025-05-15 12:56:28 +08:00
Max
a66bc2c4ca
Merge pull request #954 from trheyi/main
feat: Add support for Vision and Search in Assistant API
2025-05-14 16:03:49 +08:00
Max
aca3014167 feat: Add support for Vision and Search in Assistant API
- Introduced Vision and Search capabilities in the Assistant API, enhancing its functionality.
- Updated the Context struct to include Vision and Search fields for better context management.
- Added a new Search type to facilitate search engine integration.
- Adjusted the execute method to handle the new features appropriately.
2025-05-14 16:03:13 +08:00
Max
91883eb2f5
Merge pull request #953 from trheyi/main
fix: Correct assistant ID handling in chat methods
2025-05-13 15:20:14 +08:00
Max
51cb155d73 fix: Correct assistant ID handling in chat methods
- Updated the assignment of assistant_id to use the Default value from neo.Use, ensuring consistent behavior when the assistant_id is nil.
- Adjusted the logic for determining assistant_deleteable to compare against the Default value, improving clarity and correctness in chat functionality.
2025-05-13 15:18:25 +08:00
Max
a12378e346
Merge pull request #952 from trheyi/main
fix: Enhance loading functions to handle non-existent directories
2025-05-13 09:10:42 +08:00
Max
fabced291c fix: Enhance loading functions to handle non-existent directories
- Added checks in various loading functions to ignore processing if the respective directories do not exist, improving error handling and preventing unnecessary operations.
- Updated the Load function signature to return warnings alongside errors, allowing for better feedback on loading issues across different components.
2025-05-13 09:10:10 +08:00