feat: introduce storage provider configuration and enhance backward compatibility
- Added a new `StorageProviderConfig` struct to the `KnowledgeBase` for improved storage provider management, separating provider selection from storage credentials. - Updated the `UnmarshalJSON` method to auto-populate `StorageProviderConfig` from the legacy `StorageConfig` for backward compatibility. - Refactored various service methods to utilize the new storage provider configuration, ensuring a smooth transition from the legacy system. - Implemented database migrations to add the `storage_provider_config` column and migrate existing data, maintaining compatibility with historical knowledge bases. This update enhances the clarity and flexibility of storage configurations while ensuring compatibility with existing data structures.
This commit is contained in:
@@ -575,6 +575,7 @@ func (s *knowledgeBaseService) CopyKnowledgeBase(ctx context.Context,
|
||||
EmbeddingModelID: sourceKB.EmbeddingModelID,
|
||||
SummaryModelID: sourceKB.SummaryModelID,
|
||||
VLMConfig: sourceKB.VLMConfig,
|
||||
StorageProviderConfig: sourceKB.StorageProviderConfig,
|
||||
StorageConfig: sourceKB.StorageConfig,
|
||||
FAQConfig: faqConfig,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user