Add semantic cache support using ChromaDB
This commit is contained in:
+11
@@ -141,6 +141,17 @@ class OllamaSettingTab extends PluginSettingTab {
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
new Setting(container)
|
||||
.setName('Enable Semantic Cache')
|
||||
.setDesc('Cache responses semantically to speed up repeated queries')
|
||||
.addToggle((toggle) =>
|
||||
toggle.setValue(this.plugin.settings.cacheConfig.enabled).onChange(async (value) => {
|
||||
this.plugin.settings.cacheConfig.enabled = value;
|
||||
await this.plugin.saveSettings();
|
||||
this.plugin.notifyChatViews();
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
hide(): void {
|
||||
|
||||
Reference in New Issue
Block a user