Commit graph

9 commits

Author SHA1 Message Date
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
54e946c61d Add support for field selection in assistant filtering
- Implemented `select` parameter parsing in `parseAssistantFilter`
- Added support for selecting fields via string, string array, or interface array
- Enhanced `neo/process.go` to handle flexible field selection
- Improved error handling in stream chat processing
- Fixed function message handling in message appending
2025-01-31 11:02:31 +08:00
Max
4164f082e9 Add support for filtering assistants by multiple IDs and enhance test coverage
- Added `AssistantIDs` field to `AssistantFilter` to support filtering by multiple assistant IDs
- Updated `GetAssistants` and `DeleteAssistants` methods to handle multiple assistant ID filtering
- Expanded test cases to verify multi-ID filtering, selection, and deletion functionality
- Simplified and improved test data generation and cleanup processes

This change provides more flexible assistant retrieval and management capabilities in the Neo API.
2025-01-29 10:57:29 +08:00
Max
f14120c446 Add assistant match functionality with RAG and store support
- Implemented `processAssistantMatch` method to handle assistant matching requests
- Added support for limit parameter with default and maximum values
- Introduced `forceStore` flag to control matching method (RAG or store)
- Created placeholder methods `assistantMatchRAG` and `assistantMatchStore`
- Enhanced OpenAI message handling to parse error responses
- Updated message type handling to include error messages

This change adds flexible assistant matching capabilities with initial infrastructure for RAG and store-based matching.
2025-01-27 11:54:39 +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
882277d974 Enhance assistant filtering and management in Neo API
- Added support for filtering assistants by keywords, connector, and mentionable status in the handleAssistantList function.
- Introduced a new parseBoolValue utility function to handle various boolean formats for filtering.
- Updated the AssistantFilter structure to include an AssistantID field and a Select field for specifying returned fields.
- Refactored process functions to replace 'add' with 'create' for consistency and clarity in assistant management.
- Implemented new processAssistantFind function to retrieve assistants by ID, improving data retrieval capabilities.
- Enhanced tests to cover new filtering options and ensure robust functionality across assistant management operations.
2024-12-29 17:30:33 +08:00
Max
94f3ddb158 Enhance assistant management and JSON field handling in Neo API
- Updated SaveAssistant and processAssistantAdd methods to return assistant IDs, improving response consistency.
- Implemented logic to handle JSON fields as both strings and native types, ensuring proper storage and retrieval of assistant attributes.
- Refactored tests to cover various JSON field formats, including string, native types, and nil values, enhancing test coverage and reliability.
- Improved the assistant management structure to support mixed JSON formats, ensuring robust functionality across different storage backends.
2024-12-29 17:14:01 +08:00
Max
af65a2d5fa Refactor assistant management and enhance API response structure
- Updated the assistant management functions to utilize a unified response structure, replacing the previous 'Items' field with 'Data' for consistency across the API.
- Refactored the handling of assistant mentions and details to streamline data processing, improving code readability and maintainability.
- Enhanced the AssistantResponse type to include pagination fields directly, facilitating better management of assistant data retrieval.
- Implemented new methods for adding, saving, deleting, and searching assistants, ensuring robust functionality across different storage backends.
- Updated tests to reflect changes in the assistant management logic and response structure, ensuring comprehensive coverage and reliability.
2024-12-29 12:57:17 +08:00
Max
6450fd49e8 Refactor Neo message handling to use gin.ResponseWriter and improve error management 2024-11-07 08:40:15 +08:00