Commit graph

22 commits

Author SHA1 Message Date
Max
f0e445862f Refactor Assistant cache tests and enhance cache functionality
- Updated cache tests to use the testify assertion library for improved readability and maintainability.
- Added new tests for cache operations including basic functionality, LRU eviction, removal, clearing, and concurrent access.
- Enhanced the cache implementation to unregister scripts upon removal and clearing, ensuring proper resource management.
- Introduced an `All` method to retrieve all assistants in the cache, improving accessibility of cached items.
- Streamlined the script registration and unregistration process within the Assistant struct, enhancing script management.
2025-12-05 19:49:44 +08:00
Max
57724b20db Refactor Assistant script loading and management
- Updated the script loading process to load both hook scripts and other scripts from the src directory, improving organization and clarity.
- Introduced a new `Scripts` field in the Assistant struct to store additional scripts, enhancing the flexibility of script management.
- Removed deprecated script loading functions and streamlined the loading logic to ensure better maintainability and performance.
- Adjusted the handling of timestamps for script updates, ensuring accurate tracking of script modifications.
2025-12-05 18:10:07 +08:00
Max
0bc0821646 Refactor Assistant script handling to use HookScript
- Replaced all instances of `Script` with `HookScript` in the Assistant and related files to improve clarity and consistency in naming.
- Updated method calls in the Stream, Create, and Next hooks to utilize the new `HookScript` field.
- Adjusted tests and benchmarks to reflect the changes in script handling, ensuring all functionalities remain intact and operational.
- Enhanced the load and initialization processes to accommodate the new HookScript structure, streamlining the assistant's script management.
2025-12-05 14:45:09 +08:00
Max
311350bfbc Enhance Assistant methods with options parameter for improved context management
- Updated the Stream, BuildContent, and LLM execution methods to accept an Options parameter, allowing for more flexible context handling.
- Removed debug print statements to clean up the code and improve readability.
- Enhanced locale handling in the loadMap function to automatically inject assistant name and description into all locales, ensuring better localization support.
- Introduced output skipping functionality in context options to manage internal A2A calls more effectively.
- Improved output writer resolution logic to prioritize context settings, enhancing output management during agent calls.
2025-12-04 12:03:00 +08:00
Max
beb63b77de Enhance Assistant functionality with improved content handling and debugging
- Added support for converting extended types (file, data) to standard LLM types (text, image_url, input_audio) in the Stream method.
- Introduced a new agentCallerWrapper to facilitate agent calls from the content package.
- Implemented ThreadID management for nested agent calls to improve concurrent stream identification.
- Enhanced message handling to include metadata for message_start and message_end events, allowing for better tracking of message states.
- Removed deprecated vision capability checks from the Assistant initialization process, streamlining the codebase.
- Added new content types (file, data) to the context types for improved message content handling.
2025-12-03 21:35:54 +08:00
Max
bbba6b9fdb Add modes and database support to Assistant model
- Enhanced the `loadMap` function to include handling for `modes` and `default_mode` fields, allowing for flexible operational modes and a specified primary mode.
- Introduced a new `DB` field in the Assistant model to support database configuration, improving data management capabilities.
- Implemented the `ToModes` conversion function to facilitate various input types for modes, ensuring robust handling and validation.
- Added comprehensive tests for the `ToModes` function to validate its functionality across different input scenarios, enhancing overall reliability.
- Updated relevant methods to ensure consistent integration of the new fields and functionalities within the Assistant model.
2025-12-03 10:50:24 +08:00
Max
4b747a5bfa Add GetStorage function and enhance loadSource logic
- Introduced GetStorage function for testing purposes, allowing retrieval of the current storage instance.
- Enhanced loadSource function to load scripts from the source field if present, improving assistant initialization.
- Updated comments for clarity on TypeScript handling in loadSource, ensuring better understanding of script loading mechanics.
2025-12-02 16:54:57 +08:00
Max
42e920eed6 Implement global prompts functionality in the assistant module
- Added methods to set and retrieve global prompts, enhancing the assistant's capabilities.
- Updated the assistant's message building process to include global prompts, ensuring context-aware parsing.
- Introduced tests to validate the integration and functionality of global prompts within the assistant.
- Improved context variable handling for prompt parsing, supporting dynamic content generation.
2025-12-02 16:03:31 +08:00
Max
45029269af Enhance assistant model with global prompts functionality
- Introduced the `disable_global_prompts` field in the Assistant model to control the usage of global prompts.
- Updated the Load and Get methods to initialize and retrieve global prompts from the configuration.
- Refactored tests to validate the new global prompts functionality and ensure proper loading and context handling.
- Improved the overall structure and clarity of the assistant's capabilities and configurations.
2025-12-02 15:37:41 +08:00
Max
51092e3324 Refactor assistant model and enhance data handling
- Removed the GetByConnector method from the Assistant model to streamline the retrieval process.
- Introduced new fields for connector options and prompt presets, allowing for more flexible configurations.
- Updated the Map method to include additional fields such as connector options and prompt presets.
- Enhanced the Clone method to support deep copying of new fields.
- Improved the Update method to handle updates for the new source, connector options, and prompt presets fields.
- Refactored tests to ensure comprehensive coverage of the new functionalities and maintain clarity in the assistant structure.
2025-12-02 14:54:35 +08:00
Max
339a486eb4 Refactor assistant capabilities and update data handling
- Enhanced the getConnectorCapabilities method to prioritize model capabilities and connector settings, improving capability retrieval logic.
- Deprecated the tools field in the Assistant model, transitioning to MCP for tool management, and updated related methods accordingly.
- Introduced new fields for connector options and prompt presets in the Assistant model, allowing for more flexible configurations.
- Updated the GetAssistant method to support field selection, improving data retrieval efficiency and flexibility.
- Refactored tests and documentation to reflect changes in the assistant structure and capabilities, ensuring clarity and maintainability.
2025-12-02 12:36:47 +08:00
Max
3dd63e5530 Refactor model capabilities to use OpenAI struct
- Updated the model capabilities throughout the agent to utilize the new gouOpenAI.Capabilities struct instead of the previous ModelCapabilities.
- Adjusted related methods and types to ensure compatibility with the new capabilities structure, enhancing clarity and maintainability.
- Improved context handling and message processing by directly integrating OpenAI capabilities, streamlining the overall architecture.
2025-12-02 11:33:09 +08:00
Max
0fe0843b43 Refactor agent and assistant structure for improved clarity and performance
- Removed deprecated API and vision components, streamlining the agent's architecture.
- Updated the Load function to utilize a new agentDSL variable, enhancing the management of assistant capabilities.
- Enhanced context handling by introducing a message metadata store for thread-safe operations, improving message tracking and management.
- Refactored context methods to eliminate deprecated fields, ensuring cleaner and more maintainable code.
- Improved documentation and comments throughout the codebase to clarify changes and enhance developer understanding.
2025-11-30 11:47:25 +08:00
Max
033d94d96f Refactor connector settings to model capabilities
- Renamed and refactored functions and variables to transition from connector settings to model capabilities, enhancing clarity and consistency.
- Updated the loading mechanism to read model capabilities from `models.yml` instead of `connectors.yml`.
- Adjusted the assistant's global settings to utilize model capabilities, ensuring proper integration with the new configuration structure.
- Enhanced the reasoning adapter to support temperature adjustment based on model capabilities, improving flexibility in handling reasoning parameters.
2025-11-17 09:45:54 +08:00
Max
cef75ff71b Refactor defaultConnector variable formatting for improved readability 2025-11-15 10:12:00 +08:00
Max
f2099babd9 Update Go module dependencies and enhance assistant context management
- Upgraded Go version to 1.25 and updated several dependencies, including `testify` to v1.11.1 and added new indirect dependencies for JSON schema validation.
- Refactored the assistant's context management to utilize a new `context.Uses` structure, improving the handling of vision, audio, search, and fetch configurations.
- Enhanced the assistant's request building process to support new response formats, including JSON schema validation, ensuring better integration with various tools and services.
2025-11-15 10:05:57 +08:00
Max
124bd38f7a Implement global uses configuration and enhance assistant capabilities
- Added global uses configuration to the assistant, allowing for centralized management of vision, audio, search, and fetch settings.
- Updated the Assistant struct and related methods to support the new Uses configuration, improving flexibility in assistant operations.
- Refactored the Stream method to utilize the new CompletionResponse type, enhancing response handling.
- Introduced new methods for building requests and managing capabilities, streamlining the assistant's interaction with various connectors.
2025-11-14 19:17:21 +08:00
Max
9c97035cc6 Refactor Assistant methods and context handling for improved functionality
- Updated the Stream method to return a structured response, including create, done, and completion hooks.
- Introduced new methods for managing message history and building LLM requests, enhancing modularity.
- Refactored the Script type to utilize a new hook structure, improving code organization.
- Removed the obsolete hooks file to streamline the codebase.
- Enhanced context types with additional fields for better integration with LLM models.
2025-11-13 09:26:45 +08:00
Max
447ab4c15b Refactor store imports and update store initialization logic
- Updated import paths for store packages to use specific types for better clarity and maintainability.
- Refactored store initialization in the agent to utilize the new store types for Mongo, Redis, and Xun.
- Removed deprecated store-related files to streamline the codebase and improve overall organization.
- Ensured that all references to the store in the agent files are consistent with the new structure.
2025-11-07 18:27:43 +08:00
Max
1d5f27cd98 Refactor assistant handling and storage integration
- Updated assistant data handling to utilize structured models, improving code clarity and maintainability.
- Enhanced the assistant save and load functions to work with the new AssistantModel structure.
- Refactored mention handling to streamline the conversion process from raw data to structured mentions.
- Improved error handling in the assistant save process, ensuring better feedback for invalid data.
- Updated API responses to use the new gin.H format for consistency across the application.
2025-11-07 11:20:59 +08:00
Max
95b2547c54 Refactor to decouple attachments, RAG, and AI assistant components.
- Deleted session-related functions (UserID, GuestID, UserRoles, UserOrGuestID) from the agent package to streamline the codebase.
- Removed RAG-related code and references, simplifying the agent's architecture.
- Updated API and load functions to reflect these changes, ensuring consistency across the agent module.
- Enhanced test coverage by cleaning up deprecated test cases related to removed functionalities.
2025-11-06 19:09:44 +08:00
Max
c54ef71d6a ⚠️ BREAKING: Removed the Studio package and renamed Neo to Agent. Configuration file path changed from neo/neo.yml to agent/agent.yml.
Remove deprecated studio package and refactor agent integration

- Deleted the studio package, which is no longer in use, to streamline the codebase.
- Updated references in the agent and chat modules to utilize the new agent package instead of the deprecated neo package.
- Ensured that all related middleware and routing functionalities are now aligned with the agent architecture, enhancing overall system coherence.
2025-11-06 18:13:54 +08:00
Renamed from neo/assistant/load.go (Browse further)