- Added comprehensive curl examples for all API endpoints, including chat management, assistant management, file handling, and generation functionalities.
- Improved comments throughout the code to clarify the purpose and usage of each endpoint, enhancing developer experience and usability.
- Organized endpoint descriptions into categories for better readability and understanding of the API structure.
- Added new endpoints for managing assistants: list, detail, save, and delete.
- Implemented filtering capabilities for assistants based on keywords, tags, mentionable status, and automation.
- Refactored the assistant structure to include new fields for better management and filtering.
- Removed obsolete test data file, streamlining the codebase.
- Updated tests to cover new assistant functionalities and filtering options, ensuring robust functionality.
- Introduced SaveAssistant, DeleteAssistant, and GetAssistants methods across Mongo, Redis, and Weaviate implementations to manage assistant records.
- Enhanced the AssistantFilter and AssistantResponse types for improved pagination and filtering capabilities.
- Updated the conversation interface to include new assistant-related methods, ensuring consistent functionality across different storage backends.
- Added tests for assistant CRUD operations and pagination, ensuring robust functionality and reliability in managing assistants.
- Enhanced the assistant table by adding new fields: 'options', 'permissions', 'readonly', and 'automated', improving the management of assistant attributes.
- Updated the fields array to reflect the new structure, ensuring all fields are recognized as required attributes.
- Improved code readability by adding comments to clarify the purpose of each field.
- Introduced a new 'functions' field in the assistant table, enhancing the structure for better management of assistant capabilities.
- Updated the fields array to include 'functions', ensuring it is recognized as a required attribute in the assistant structure.
- Introduced a new 'files' field in the assistant table within the Xun implementation, allowing for better management of associated files.
- Updated the fields array to include the new 'files' field, ensuring it is recognized as a required attribute in the assistant structure.
- Replaced the base assistant package with a local assistant implementation, enhancing modularity and maintainability.
- Updated the newAssistantByConnector function to utilize the local assistant, ensuring consistent error handling and improved functionality.
- Removed obsolete base assistant files, streamlining the codebase and reducing complexity.
- Added a new 'mentionable' field to the assistant table in the Xun implementation, allowing for better management of assistant visibility in mentions.
- Updated SaveHistory method across Mongo, Redis, and Weaviate to include a context parameter, improving flexibility in message storage.
- Modified the Assistant struct in types.go to add new fields: Type, Avatar, and Flows, enhancing the representation of assistant attributes.
- Adjusted the Xun implementation to support the new context handling in SaveHistory, ensuring messages can now include contextual information.
- Updated tests to reflect changes in message structure and ensure proper functionality with the new context parameter.
- Added support for Server-Sent Events (SSE) in the handleGenerateTitle function to send error messages in the appropriate SSE format when invalid request bodies are encountered.
- Updated response headers for SSE requests to ensure correct content type and connection settings, improving the API's handling of real-time updates and error reporting.
- Modified the handleChatUpdate function to pass an additional parameter for silent mode when generating chat titles, enhancing the flexibility of chat title generation.
- This change allows for improved handling of chat updates, ensuring that the API can better manage user expectations and interactions.
- Added new GET and POST endpoints for generating custom content, chat titles, and prompts, expanding the API's capabilities.
- Implemented support for Server-Sent Events (SSE) in response handling, allowing for real-time updates and improved user experience.
- Refactored validation and error handling to differentiate between regular and SSE requests, ensuring appropriate responses based on the request type.
- Updated the GenerateWithAI method to support silent mode for regular HTTP requests, enhancing flexibility in content generation.
- Improved overall structure and maintainability of the API by consolidating request handling logic.
- Registered new OPTIONS routes for /generate, /generate/title, and /generate/prompts in the Neo API, enhancing CORS support for the recently introduced generation functionalities.
- This update ensures that the API can handle preflight requests for these endpoints, improving overall API usability and compliance with CORS standards.
- Introduced new API endpoints for generating custom content, chat titles, and prompts, enhancing the functionality of the Neo API.
- Implemented handleGenerateCustom, handleGenerateTitle, and handleGeneratePrompts methods to process generation requests with appropriate validation and error handling.
- Refactored the GenerateWithAI method to support different content types and system prompts, improving the flexibility of AI-generated responses.
- Updated the API router to include the new generation routes, ensuring seamless integration with existing middleware.
- Updated the golang.org/x/net dependency from v0.27.0 to v0.33.0 in go.mod.
- Updated the corresponding checksums in go.sum to reflect the new version.
- Convert keywords to lowercase for case-insensitive matching in handleMentions method.
- Introduce test data for mentions to improve testing and demonstration of functionality.
- Implement filtering of mentions based on keywords, allowing users to retrieve relevant mentions more effectively.
- Append test mentions to actual mentions before returning the response, enhancing the API's usability.
- Added time-based generation of chat IDs when not provided, improving chat session management.
- Updated context handling in handleChat to ensure valid chat IDs are used.
- Expanded allowed HTTP methods in CORS headers to include DELETE, enhancing API flexibility.
- Removed redundant chat history saving logic from GenerateChatTitle method, streamlining chat processing.
- Updated GetChats method to filter out empty chat IDs, ensuring only valid chats are processed.
- Improved date handling by refining the logic for grouping chats into "This Week" and "Last Week" categories.
- Enhanced error handling for created_at field parsing, supporting multiple date formats for better robustness.
- Streamlined chat grouping logic for clearer organization of chat data in responses.
- Introduced new API endpoints for deleting individual chats and clearing all chats for a user, enhancing chat management capabilities.
- Implemented handleChatDelete and handleChatsDeleteAll methods to process deletion requests, including error handling for missing session and chat IDs.
- Updated API router to register new endpoints under the 'dangerous' path, ensuring clear separation of critical operations.
- Enhanced overall API structure and maintainability by adding robust feedback mechanisms for deletion operations.
- Implemented DeleteChat and DeleteAllChats methods in Mongo, Redis, Weaviate, and Xun conversation handlers to allow users to delete specific chats and all chats associated with their account.
- Updated the Conversation interface in types.go to include the new deletion methods, ensuring consistent API across different storage backends.
- Added unit tests for DeleteChat and DeleteAllChats methods in xun_test.go to verify functionality and ensure proper deletion of chat histories.
- Enhanced error handling in deletion methods to provide robust feedback during chat removal operations.
- Updated GetChats method across conversation implementations to accept a ChatFilter struct, enabling keyword filtering, pagination, and ordering.
- Enhanced handleChatList method in the Neo API to construct a filter from query parameters, improving the flexibility of chat retrieval.
- Introduced new types (ChatFilter, ChatGroup, ChatGroupResponse) to facilitate structured responses and better organization of chat data.
- Improved error handling and response structure for chat retrieval, ensuring robust feedback and clarity in API responses.
- Introduced a new UserField in the Setting struct to allow customization of the user ID field name.
- Implemented getUserID method in Xun to retrieve user IDs based on the configured UserField, improving flexibility in user identification.
- Updated multiple methods (UpdateChatTitle, GetChats, GetHistory, SaveHistory, GetRequest, SaveRequest, GetChat) to utilize the new user ID retrieval logic, ensuring consistent handling of user sessions.
- Enhanced error handling for user ID retrieval, ensuring robust feedback in case of issues.
- Updated handleChatUpdate method to include content field in the request body, allowing for dynamic chat title generation based on user input.
- Implemented GenerateChatTitle method to create a concise title for chats, improving user experience and interaction.
- Modified JSON response structure in handleChatDetail and handleChatUpdate methods for better clarity and consistency.
- Enhanced error handling for chat updates, ensuring robust validation and feedback for users.
- Introduced a new endpoint for updating chat details, allowing users to modify chat titles via the handleChatUpdate method.
- Implemented error handling for missing session IDs and chat IDs, ensuring robust validation of input parameters.
- Enhanced existing API structure by adding status, chat list, chat detail, history, file upload, download, and mentions endpoints, improving overall API usability.
- Improved code organization and maintainability by clearly defining new methods for handling chat updates and related functionalities.
- 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.
- Introduced a NewQuery method to streamline query creation, enhancing code readability and maintainability.
- Updated multiple methods (UpdateChatTitle, GetChats, GetHistory, SaveHistory, GetRequest, SaveRequest, clean) to utilize the new query method, reducing redundancy in query table references.
- Improved overall structure of the conversation management code by centralizing query logic.
- Introduced a new endpoint for downloading files, enhancing the API's capabilities.
- Implemented the handleDownload method to manage download requests, including validation for required parameters (sid and file_id).
- Updated the Download method in the assistant interface to retrieve files based on file_id, ensuring proper error handling and response structure.
- Enhanced file upload logic to include file extensions in generated IDs for better file management.
- Added necessary response headers for file downloads, improving user experience during file retrieval.