Commit graph

2993 commits

Author SHA1 Message Date
Max
c562da374a
Merge pull request #986 from trheyi/main
Implement file download functionality and refactor existing methods i…
2025-06-01 18:34:21 +08:00
Max
445bcdd7ea Implement file download functionality and refactor existing methods in neo package
- Added handleDownload method to manage file download requests, including validation for session ID and file ID.
- Enhanced permission checks to ensure users can only download files they are authorized to access.
- Updated CORS headers to include Content-Disposition for better file handling in responses.
- Removed deprecated download logic from the neo package to streamline code and improve maintainability.
- Refactored existing methods to improve clarity and error handling during file operations.
2025-06-01 18:33:38 +08:00
Max
a0612666c4
Merge pull request #985 from trheyi/main
Enhance file upload handling and deduplication features in neo package
2025-06-01 17:47:09 +08:00
Max
e6a0f37a66 Enhance file upload handling and deduplication features in neo package
- Updated UserOrGuestID method to return guest status alongside user ID.
- Introduced UploadOption struct to encapsulate additional upload parameters, including public visibility and collection ID.
- Enhanced handleUpload method to validate collection ID for knowledge storage and improved error handling.
- Updated GetHeader function to include file size in the header processing.
- Implemented content fingerprinting for file deduplication and added support for upload status tracking.
- Enhanced README documentation to reflect new features and usage examples for file uploads and deduplication.
2025-06-01 17:46:28 +08:00
Max
61ba09e3f3
Merge pull request #984 from trheyi/main
Add KnowledgeFilter struct and update database configuration in README
2025-06-01 16:44:27 +08:00
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
eda68070af
Merge pull request #983 from trheyi/main
Add attachment status management and filtering in neo package
2025-06-01 16:27:06 +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
666fc169f9
Merge pull request #982 from trheyi/main
Add attachment and knowledge management features in neo package
2025-06-01 16:07:11 +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
df595903d9
Merge pull request #981 from trheyi/main
Refactor file upload handling in neo package
2025-06-01 12:01:23 +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
8724991c04
Merge pull request #980 from trheyi/main
Enhance file upload functionality and authentication in neo package
2025-05-31 16:36:32 +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
d2c1e58c5c
Merge pull request #979 from trheyi/main
Enhance asset upload management in neo package
2025-05-31 13:33:45 +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
372fb77906
Merge pull request #978 from trheyi/main
Add upload management to neo package for enhanced file handling
2025-05-31 11:35:04 +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
1cedd5ef4c
Merge pull request #977 from trheyi/main
Update dependencies in go.mod and go.sum; refactor file handling in n…
2025-05-31 10:07:56 +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
72dca49e54
Merge pull request #976 from trheyi/main
Refactor menu processing logic to improve error handling and streamli…
2025-05-27 12:40:40 +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
d82204869e
Merge pull request #975 from trheyi/main
Refactor Assistant struct to replace Flows with Workflow and update c…
2025-05-27 12:08:23 +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
49de675c62
Merge pull request #974 from trheyi/main
Enhance localization support in chat and assistant functionalities
2025-05-27 11:53: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
5bbd8954d7
Merge pull request #973 from trheyi/main
Enhance localization support and refactor assistant functions for imp…
2025-05-26 12:01:43 +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
73c63cff47
Merge pull request #972 from trheyi/main
Update system time message format in API response
2025-05-25 11:35:05 +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
9334501771
Merge pull request #971 from trheyi/main
Enhance i18n support and refactor API response handling in assistant …
2025-05-25 10:51:35 +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
af11bb511d
Merge pull request #970 from trheyi/main
Refactor API response handling and enhance locale support in assistan…
2025-05-24 20:37:05 +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
0477dd380d
Merge pull request #969 from trheyi/main
Remove hooks.go file and refactor Load function in load.go to streaml…
2025-05-24 18:38:10 +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
802b40d8a7
Merge pull request #968 from trheyi/main
Update dependencies in go.mod and go.sum
2025-05-22 23:23:15 +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
d8e7560ff7
Merge pull request #967 from trheyi/main
Enhance Context struct by adding Locale and Theme fields
2025-05-19 18:16:22 +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