Commit graph

30 commits

Author SHA1 Message Date
Max
435b482c38 Refactor attachment handling and enhance upload options
- Updated the API to include new upload options for handling different storage types: chat, knowledge, and assets.
- Improved group building logic for attachment uploads based on user, chat, and assistant IDs.
- Removed deprecated attachment files and refactored related code to streamline the attachment management process.
- Enhanced error handling for required fields in upload options, ensuring better validation and user feedback.
2025-07-25 17:25:12 +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
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
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
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
712bb99ab1 feat: Enhance context management and update asset metadata in SUI
- Updated modification times for various asset files in bindata.go to reflect recent changes.
- Improved context handling in the API by adding support for silent mode, history visibility, and client type.
- Refactored assistant ID usage to ensure consistent access to the default assistant across various methods.
- Enhanced the Agent class in libsui/agent.ts to manage silent mode and history visibility settings effectively.
2025-05-08 20:05:39 +08:00
Max
741a650517 Add connector settings support in DSL and assistant initialization
- Updated `DSL` struct to include `Connectors` with `assistant.ConnectorSetting` type
- Modified `initAssistant()` to set connector settings via `SetConnectorSettings()`
- Adjusted `load.go` and `types.go` to support new connector settings configuration
- Implemented connector-specific tool and vision handling in assistant methods
2025-02-01 17:45:01 +08:00
Max
86d4ea71cc Refactor Neo initialization methods to use global Neo instance
- Converted initialization methods from receiver methods to package-level functions
- Simplified method calls by directly using the global Neo instance
- Removed redundant method receiver references in initialization logic
- Improved code readability and reduced unnecessary method complexity

This change streamlines the Neo initialization process and makes the code more straightforward and maintainable.
2025-01-26 16:42:31 +08:00
Max
55c0580fc3 Refactor Neo API assistant management and remove obsolete functions
- Removed unused assistant-related functions and types from the Neo API, including local chat and file handling, to streamline the codebase.
- Refactored the assistant initialization process, consolidating the loading and configuration of assistants, including Vision and Connector settings.
- Updated the DSL struct to enhance clarity and maintainability, ensuring better configuration management for assistants.
- Improved error handling and modularity in the assistant loading process, paving the way for future enhancements in AI functionalities.
2025-01-03 16:37:43 +08:00
Max
966b0f601f Update Go module dependencies and enhance Neo API with Vision integration
- Removed obsolete AWS SDK v2 dependencies from go.mod and go.sum to streamline the codebase.
- Added Vision-related imports and initialized Vision settings in the Neo API, enhancing AI capabilities.
- Introduced initVision method to configure and initialize the Vision instance, improving modularity and functionality.
- Updated the DSL struct to include Vision settings, allowing for better configuration management.

This commit supports future enhancements in AI functionalities and improves the overall structure of the Neo API.
2025-01-03 15:56:14 +08:00
Max
af30bec4f0 Enhance RAG configuration and assistant loading in Neo API
- Updated the SetRAG function to include RAG settings, allowing for more detailed configuration during assistant initialization.
- Refactored the LoadBuiltIn function to streamline the saving process of assistants, improving error handling and code clarity.
- Modified loadPrompts and loadScript functions to return timestamps, enabling tracking of creation and update times for assistants.
- Enhanced the Assistant struct with created_at and updated_at fields, improving data management and traceability.
- Overall improvements to the assistant loading process, ensuring better organization and maintainability of the codebase.
2025-01-02 18:56:35 +08:00
Max
2903602c6b Refactor Neo API initialization and enhance assistant management
- Introduced new methods for initializing RAG and store, improving modularity and clarity in the Load function.
- Refactored the assistant initialization process to streamline the loading of built-in assistants and set RAG configurations.
- Moved the defaultAssistant method from neo.go to load.go for better organization and accessibility.
- Enhanced error handling in store initialization to support multiple connector types, including Redis and Mongo.
- Updated the assistant struct to include RAG settings, improving the overall assistant management capabilities.
2025-01-02 16:55:21 +08:00
Max
6288e25a8a Refactor conversation table handling and update settings structure in Neo API
- Changed the 'Table' field to 'Prefix' in the Setting struct to better represent its purpose as a table name prefix.
- Updated all relevant instances in the codebase to use the new 'Prefix' field, ensuring consistency across the application.
- Adjusted logging and table retrieval methods to reflect the new naming convention, enhancing clarity and maintainability.
2025-01-02 16:22:10 +08:00
Max
fdf71f4cfd Update Go version and dependencies; enhance Neo API functionality
- Bump Go version from 1.22.2 to 1.23 for improved performance.
- Update dependencies in go.mod and go.sum, including:
  - github.com/PuerkitoBio/goquery to v1.10.1
  - github.com/dchest/captcha to v1.1.0
  - github.com/evanw/esbuild to v0.24.2
  - github.com/fatih/color to v1.18.0
  - github.com/fsnotify/fsnotify to v1.8.0
  - github.com/spf13/cobra to v1.8.1
  - github.com/stretchr/testify to v1.10.0
  - github.com/xuri/excelize/v2 to v2.9.0
- Introduce RAG (Retrieval-Augmented Generation) initialization in the Neo API, enhancing assistant capabilities.
- Refactor workflows to use Go 1.23 for testing and CI processes, ensuring compatibility with the latest features.
2025-01-02 13:06:36 +08:00
Max
fd5d701a23 Refactor assistant loading and initialization in Neo API
- Simplified the assistant loading process by removing the asynchronous query for the assistant list and replacing it with a direct call to retrieve the default assistant.
- Introduced a new method, defaultAssistant, to streamline the retrieval of the default assistant based on the current configuration.
- Enhanced the LoadStore function to support loading assistants from a specified path, improving flexibility in assistant management.
- Updated the overall structure for better readability and maintainability, ensuring a more efficient assistant initialization process.
2025-01-01 17:34:17 +08:00
Max
f8ce8fc193 Enhance assistant management and API functionality in Neo
- Added a new endpoint to retrieve all assistant tags, improving data accessibility for clients.
- Updated the assistant list handling to support filtering by built-in status and assistant ID, enhancing the filtering capabilities.
- Introduced a method to load built-in assistants, streamlining the assistant initialization process.
- Enhanced the Assistant struct with new fields for path, built-in status, and sorting, improving data organization.
- Implemented validation and cloning methods for the Assistant struct, ensuring data integrity and ease of use.
- Updated tests to cover new functionalities, including validation, cloning, and tag retrieval, ensuring robust functionality across the assistant management operations.
2025-01-01 16:48:06 +08:00
Max
e530ccc1cd Refactor conversation management and migrate to store-based architecture in Neo API
- Replaced the conversation handling logic with a new store-based approach, enhancing data management and retrieval capabilities.
- Updated all relevant methods to utilize the new store interface, including GetChats, GetChat, GetHistory, and SaveAssistant, ensuring consistent functionality across the API.
- Removed deprecated conversation-related files and structures, streamlining the codebase and improving maintainability.
- Enhanced the AssistantFilter and AssistantResponse types to support the new store architecture, improving filtering and pagination capabilities.
- Updated tests to cover the new store-based methods and ensure robust functionality across different storage backends.
2025-01-01 10:43:05 +08:00
Max
c8643bbe45 Refactor HookCreate and assistant management in Neo API to improve response handling and streamline assistant creation. Update HookCreate to return structured CreateResponse with AssistantID and ChatID, enhancing error handling. Modify Load function to create the default assistant after querying the assistant list, ensuring proper initialization. Refactor newAssistant methods for better clarity and maintainability, and update types to include CreateResponse struct for improved response management. 2024-12-14 14:53:01 +08:00
Max
6c244d8788 Refactor Neo API to enhance CORS handling and streamline endpoint registration. Introduce OPTIONS handlers for all endpoints, improve CORS middleware logic, and reorganize assistant creation flow in load.go. Additionally, add a delay in the Answer method to ensure proper retrieval of assistant and chat IDs. 2024-12-14 13:03:05 +08:00
Max
2ebc29d6f7 Enhance Neo API and conversation management by adding support for server-sent events (SSE) in chat handling, improving error messaging with structured responses, and refactoring assistant creation logic. Update conversation settings to utilize a new assistant model and implement context management improvements for better performance. Additionally, streamline the DSL structure and enhance test coverage for chat functionalities. 2024-12-13 17:51:13 +08:00
Max
153efc1a49 Refactor command handling and conversation management by removing the command package, updating conversation methods to support chat IDs, and enhancing API functionality for chat history and titles. This includes adjustments to the DSL context and conversation settings for improved data handling. 2024-12-12 16:37:59 +08:00
Max
61a292c7a6 Neo initialization to enable ‘moapi’ connector and default model support 2024-11-05 16:06:32 +08:00
Max
307f70873a [fix] neo command parser bug 2023-05-14 01:28:13 +08:00
Max
7b8459b688 [add] Neo matching command 2023-05-04 02:14:34 +08:00
Max
5f67f64f40 [add] Neo save chat history (80%) 2023-04-30 19:22:23 +08:00
Max
7ee7de96c9 [add] Neo (70%) 2023-04-30 14:21:45 +08:00
Max
1bafeabdba [add] Neo tests ( 60% ) 2023-04-29 19:16:13 +08:00
Max
60ef6c1e5c [add] neo (50%) 2023-04-29 16:48:37 +08:00