Commit graph

35 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
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
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
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
455e39fa54 Refactor assistant types and tools support
- Renamed `Functions` to `Tools` across multiple files
- Added `ConnectorSetting` to support vision and tools flags
- Updated loading and serialization logic for tools
- Modified message contents handling for better JSON parsing
- Adjusted test cases to reflect tool-related changes
2025-02-01 17:04:45 +08:00
Max
63807e1944 Enhance Neo API assistant with improved message handling and hook support
- Updated HookCreate to support extended timeout and input message parsing
- Modified CreateResponse to include optional input messages
- Refactored assistant hooks to improve context and message handling
- Added support for more flexible streaming and done hook processing
- Adjusted timeout contexts and method signatures for better error management

This change improves the Neo API assistant's flexibility and robustness in handling complex message interactions and hook scenarios.
2025-01-29 16:05:36 +08:00
Max
90967f58c1 Refactor Neo API context handling and improve context management
- Replaced the custom context creation functions with a new context package, enhancing consistency and maintainability across the API.
- Updated multiple methods in the DSL to utilize the new context package, ensuring a unified approach to context management.
- Removed the obsolete context.go file, streamlining the codebase and reducing redundancy.

These changes improve the overall structure and clarity of the Neo API, paving the way for future enhancements in context handling and assistant functionalities.
2025-01-06 14:20:39 +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
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
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
eadc550980 Add chat detail and mentions handling in Neo API
- Introduced new endpoints for retrieving chat details and mentions, enhancing the API's functionality.
- Implemented handleChatDetail method to fetch details of a specific chat by ID, including error handling for missing parameters.
- Added handleMentions method to retrieve mentions based on keywords, improving user interaction with chat content.
- Updated existing GetChats method to support keyword filtering, allowing for more refined chat list retrieval.
- Enhanced the DSL structure to include new methods for managing mentions and chat details, improving overall code organization and maintainability.
2024-12-16 17:36:02 +08:00
Max
773e050925 Implement file upload functionality in Neo API, adding new endpoint for file uploads and enhancing assistant management. Introduce handleUpload method to process file uploads, including size and type validation. Update context to include upload information and refactor assistant selection logic for improved clarity. Enhance error handling and response structure for file upload operations, ensuring robust communication of success and failure states. 2024-12-14 19:39:14 +08:00
Max
c98a402e54 Refactor Neo API chat handling to improve AI interaction and error management. Introduce background processing for chat with AI, enhancing responsiveness and client handling. Update assistant initialization logic to streamline the creation of OpenAI assistants and ensure proper error handling. Modify message struct to support structured error responses, improving clarity in communication. Additionally, clean up unused code and enhance overall maintainability of the assistant management system. 2024-12-14 17:45:40 +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
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
1f4e9e5a16 feat: Add SelectModel command to DSL
Add the SelectModel command to the DSL, allowing the selection of a specific model. This command takes a model name as input and sets the AI to use that model. It returns a success message with a status code of 200 if the selection is successful.
2024-05-25 20:17:25 +08:00
Max
bd518610b9 [add] neo custom write process 2023-10-20 13:59:44 +08:00
Max
5a3d42a965 fix CROS bug 2023-09-21 11:32:03 +08:00
Max
307f70873a [fix] neo command parser bug 2023-05-14 01:28:13 +08:00
Max
5e46dc74f5 [add] Neo prepare hook 2023-05-12 17:28:33 +08:00
Max
4bb5fca430 [add] Neo enter command mode by typing the /name 2023-05-12 13:20:09 +08:00
Max
0f70639292 [add] Neo Command ( 50% ) 2023-05-05 22:07:12 +08:00
Max
0b3ebceffa [add] Neo optimizing response data 2023-05-04 04:59:17 +08:00
Max
7b8459b688 [add] Neo matching command 2023-05-04 02:14:34 +08:00
Max
1f51bdaf8f [add] neo commands ( 50% ) 2023-05-02 19:36:02 +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