13 lines
452 B
C#
13 lines
452 B
C#
namespace BotSharp.Plugin.KnowledgeBase.Services;
|
|
|
|
public partial class KnowledgeService
|
|
{
|
|
public async Task<bool> RefreshVectorKnowledgeConfigs(VectorCollectionConfigsModel configs)
|
|
{
|
|
var db = _services.GetRequiredService<IBotSharpRepository>();
|
|
var collections = configs.Collections ?? new();
|
|
var saved = db.AddKnowledgeCollectionConfigs(collections, reset: true);
|
|
return await Task.FromResult(saved);
|
|
}
|
|
}
|