Commit graph

2 commits

Author SHA1 Message Date
Max
1f1f44fab5 Refactor 'readable' field to 'readonly' in model and database handling
- Updated the Info struct to replace the 'readable' field with 'readonly' for better clarity in metadata representation.
- Modified Create and Update methods in db.go to utilize the new 'readonly' field.
- Enhanced test cases to assert the correctness of 'readonly' and 'builtin' fields, ensuring comprehensive validation of model attributes.
- Adjusted model loading logic to correctly populate 'readonly' and 'builtin' fields from metadata.
2025-07-16 11:39:36 +08:00
Max
25c5688727 Enhance model loading and error handling in YaoModel
- Refactored the Load, Unload, and Reload methods to support multiple data source options, including loading from a provided source, file system, or database.
- Improved error handling by implementing panic recovery in the Unload method to manage model retrieval failures gracefully.
- Removed the Source field from UnloadOptions struct to streamline the options interface.
2025-07-15 20:21:45 +08:00