-
-
Notifications
You must be signed in to change notification settings - Fork 594
Optimize GetKnowledgeCollectionConfig #1246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||||||
|
reviewed |
PR Type
Enhancement
Description
Add new
GetKnowledgeCollectionConfigmethod for optimized single config retrievalImplement caching with
SharpCache(10)attribute for performance improvementRefactor
KnowledgeSettingHelperto use new optimized methodAdd
Rougamo.Fodydependency to support caching functionalityDiagram Walkthrough
File Walkthrough
IBotSharpRepository.cs
Add GetKnowledgeCollectionConfig interface methodsrc/Infrastructure/BotSharp.Abstraction/Repositories/IBotSharpRepository.cs
GetKnowledgeCollectionConfigto interfacecollectionNameandvectorStroageProviderparametersVectorCollectionConfiginstead of enumerableFileRepository.KnowledgeBase.cs
Implement cached GetKnowledgeCollectionConfig in FileRepositorysrc/Infrastructure/BotSharp.Core/Repository/FileRepository/FileRepository.KnowledgeBase.cs
GetKnowledgeCollectionConfigmethod withSharpCache(10)attribute
FirstOrDefault()KnowledgeSettingHelper.cs
Refactor to use optimized GetKnowledgeCollectionConfig methodsrc/Plugins/BotSharp.Plugin.KnowledgeBase/Helpers/KnowledgeSettingHelper.cs
GetKnowledgeCollectionConfigmethodMongoRepository.KnowledgeBase.cs
Implement cached GetKnowledgeCollectionConfig in MongoRepositorysrc/Plugins/BotSharp.Plugin.MongoStorage/Repository/MongoRepository.KnowledgeBase.cs
GetKnowledgeCollectionConfigmethod withSharpCache(10)attribute
FirstOrDefault()BotSharp.Plugin.MongoStorage.csproj
Add Rougamo.Fody dependency for caching supportsrc/Plugins/BotSharp.Plugin.MongoStorage/BotSharp.Plugin.MongoStorage.csproj
Rougamo.Fodypackage reference to project dependencies