- Added the github.com/spf13/cast dependency to improve type conversion capabilities.
- Enhanced the requestMessages function to include prompts, allowing for more dynamic message handling.
- Updated the LoadBuiltIn function to ensure the "Built-in" tag is added if it doesn't already exist, improving assistant organization.
- Refactored sorting logic to utilize the cast package for better type safety.
These changes support improved functionality and maintainability in the assistant management process.
- 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.
- 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.
- Deleted the obsolete prompt.md file, streamlining the codebase.
- Added tests for image upload and download functionality using local and S3 storage drivers, ensuring robust handling of image files.
- Implemented image compression during upload for both local and S3 storage, maintaining aspect ratio and limiting dimensions to a maximum size of 1920x1080.
- Enhanced the local and S3 storage drivers to support image compression, improving storage efficiency.
- Updated tests to verify image dimensions and content type after upload and download operations, ensuring data integrity.
- Added several AWS SDK v2 modules to go.mod and go.sum, enhancing cloud service integration capabilities:
- github.com/aws/aws-sdk-go-v2 and its related services (S3, STS, SSO, etc.) for improved AWS functionality.
- Updated indirect dependencies to ensure compatibility and performance improvements.
- This update supports future development involving AWS services, streamlining the integration process.
- 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.
- Deleted the assistant.go and assistant_test.go files, which contained the implementation and tests for assistant management.
- This cleanup reduces complexity and focuses on core functionalities, paving the way for future enhancements in assistant handling.
- 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.
- 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.
- 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.
- Bump Go version from 1.20 to 1.22.2 for improved performance and features.
- Update indirect dependencies to their latest versions, including:
- github.com/cespare/xxhash/v2 from v2.2.0 to v2.3.0
- github.com/golang/protobuf from v1.5.3 to v1.5.4
- github.com/klauspost/compress from v1.17.3 to v1.17.4
- golang.org/x/oauth2 from v0.14.0 to v0.23.0
- google.golang.org/grpc from v1.60.1 to v1.69.2
- google.golang.org/protobuf from v1.34.2 to v1.36.1
- Add new dependencies for OpenTelemetry packages, enhancing observability capabilities.
- 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.
- Added support for initializing assistant tags with a default value of "Built-in" if none are provided, improving data consistency.
- Implemented loading of tags, options, and description from the input data map, enhancing the flexibility of assistant configuration.
- Updated the LoadBuiltIn and loadMap functions to accommodate new fields, streamlining the assistant loading process.
- 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.
- Removed Weaviate store implementation, streamlining the codebase and focusing on Mongo and Redis backends.
- Introduced GetAssistant method in both Mongo and Redis stores to retrieve a single assistant by ID, improving data access capabilities.
- Updated LoadStore function to utilize the new storage retrieval logic, enhancing the assistant loading process.
- Enhanced the Assistant struct to include a Script field for better management of assistant scripts.
- Improved tests to cover the new GetAssistant functionality, ensuring robust error handling and data retrieval across different scenarios.
- 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.
- Updated the message handling logic to improve error reporting and content management, ensuring more robust communication with clients.
- Introduced a new ReadBase64 method in both Local and OpenAI assistant implementations to read files and return their base64 encoded content, enhancing file handling capabilities.
- Removed the deprecated JSON message handling code, streamlining the message processing structure.
- Refactored message struct to include new fields and methods for better data management and response handling.
- Improved the chat functionality to handle attachments and user messages more effectively, ensuring a smoother user experience.
- 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.
- 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.
- 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.
- Introduced a new GET endpoint at `/utility/connectors` to list available connectors, enhancing the API's utility features.
- Implemented `handleConnectors` function to filter and format connector data, providing a structured response with labels and values for each connector.
- Updated documentation comments to include usage examples for the new endpoint, improving developer experience and usability.
- 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.