Commit graph

9 commits

Author SHA1 Message Date
Max
f54d030486 Add Agent API for AI interactions and chat completions
- Introduced the Agent API to facilitate AI agent interactions, including chat completions with real-time streaming capabilities.
- Implemented endpoints for GET and POST requests to handle chat completions, supporting features like context management and assistant selection.
- Updated the README to include comprehensive documentation for the Agent API, detailing its functionalities, key endpoints, and usage examples.
- Enhanced the OpenAPI structure to integrate the new agent handlers into the existing routing system, ensuring OAuth protection for all endpoints.
2025-07-27 15:18:54 +08:00
Max
070ff59225 Enhance attachment management with file storage improvements
- Refactored the attachment manager to support file uploads with a new storage path and improved metadata handling.
- Implemented chunked uploads and direct content retrieval, enhancing performance and flexibility.
- Updated the file management API to include comprehensive operations for file uploads, downloads, and metadata management.
- Added support for multiple storage backends, including local and S3, with improved error handling and validation.
- Enhanced test coverage for file operations, ensuring reliability and consistency across different storage implementations.
2025-07-26 19:25:41 +08:00
Max
aae1bccf88 Add Knowledge Base API endpoints and integrate with OpenAPI router
- Introduced the Knowledge Base (KB) API by creating a new kb package with various endpoints for collection and document management, segment management, and search functionalities.
- Updated the OpenAPI router to attach the KB API, ensuring OAuth protection for all endpoints.
- Implemented logging for configuration validation to enhance error handling and user feedback.
2025-07-23 15:19:40 +08:00
Max
92d21c5389 Remove hello world endpoints and refactor routing to use new hello package
- Deleted the existing hello world handlers from hello.go to streamline the codebase.
- Updated openapi.go to attach the new hello package for handling hello world routes, ensuring OAuth protection is applied correctly.
- Enhanced the README.md to reflect the new structure and provide comprehensive documentation for the hello world API endpoints.
2025-07-22 16:55:24 +08:00
Max
458391f5b4 Refactor OAuth endpoint structure and add well-known handlers
- Removed OAuth discovery and metadata endpoints from the attachOAuth function to streamline the code.
- Introduced a new method to handle well-known endpoints, improving organization and clarity in the OAuth implementation.
- Updated the Attach method to include the new well-known handlers, ensuring proper routing for OAuth-related metadata.
2025-07-20 19:11:16 +08:00
Max
b96a400869 Add OpenAPI support and enhance configuration handling
- Integrated OpenAPI loading functionality into the engine's Load and Reload processes, allowing for better API management.
- Updated the OpenAPI configuration to set a default BaseURL and ensure it does not have a trailing slash.
- Implemented the Attach method to connect the OpenAPI server to the Gin router, facilitating API endpoint management.
- Removed the obsolete hello package to streamline the OpenAPI module.
2025-07-20 18:52:30 +08:00
Max
0fff602c93 Implement JSON marshaling and unmarshaling for configuration with duration parsing
- Enhanced the Config struct to support JSON marshaling and unmarshaling with human-readable duration strings for various OAuth settings.
- Introduced temporary structures to facilitate the conversion of string duration fields to time.Duration types during JSON operations.
- Added utility functions for parsing and formatting duration strings, ensuring accurate handling of time-related configurations.
- Updated tests to validate the correct parsing and formatting of duration fields in the configuration.
2025-07-20 17:49:01 +08:00
Max
8523170992 Implement system store management and enhance store loading functionality
- Introduced a new system store management feature, allowing for the loading of predefined system stores such as cache and OAuth client stores.
- Added a `loadSystemStores` function to handle the loading of system stores with variable replacement for configuration paths.
- Enhanced the `Load` function to include the loading of system stores, improving the overall store management process.
- Updated test utilities to support loading system stores for testing, ensuring comprehensive coverage and functionality.
- Refactored the `replaceVars` function to facilitate variable replacement in JSON strings, enhancing flexibility in store configurations.
2025-07-20 11:23:00 +08:00
Max
72b732348d Enhance OAuth configuration types with optional defaults
- Updated the SigningConfig, TokenConfig, SecurityConfig, and ClientConfig structures to include optional default values for various fields, improving clarity and usability.
- Added comments to specify default values and optionality for each configuration parameter, enhancing documentation within the code.
- This change aims to streamline the configuration process for OAuth service implementations.
2025-07-18 17:05:13 +08:00