mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-28 01:45:07 +01:00
Set no. of results used to generate chat response from Khoj Obsidian
This commit is contained in:
parent
2f31de5ed5
commit
1d77fe712c
2 changed files with 2 additions and 2 deletions
|
@ -158,7 +158,7 @@ export class KhojChatModal extends Modal {
|
||||||
|
|
||||||
// Get chat response from Khoj backend
|
// Get chat response from Khoj backend
|
||||||
let encodedQuery = encodeURIComponent(query);
|
let encodedQuery = encodeURIComponent(query);
|
||||||
let chatUrl = `${this.setting.khojUrl}/api/chat?q=${encodedQuery}&client=obsidian`;
|
let chatUrl = `${this.setting.khojUrl}/api/chat?q=${encodedQuery}&n=${this.setting.resultsCount}&client=obsidian`;
|
||||||
let responseElement = this.createKhojResponseDiv();
|
let responseElement = this.createKhojResponseDiv();
|
||||||
|
|
||||||
// Temporary status message to indicate that Khoj is thinking
|
// Temporary status message to indicate that Khoj is thinking
|
||||||
|
|
|
@ -54,7 +54,7 @@ export class KhojSettingTab extends PluginSettingTab {
|
||||||
}));
|
}));
|
||||||
new Setting(containerEl)
|
new Setting(containerEl)
|
||||||
.setName('Results Count')
|
.setName('Results Count')
|
||||||
.setDesc('The number of search results to show')
|
.setDesc('The number of results to show in search and use for chat')
|
||||||
.addSlider(slider => slider
|
.addSlider(slider => slider
|
||||||
.setLimits(1, 10, 1)
|
.setLimits(1, 10, 1)
|
||||||
.setValue(this.plugin.settings.resultsCount)
|
.setValue(this.plugin.settings.resultsCount)
|
||||||
|
|
Loading…
Reference in a new issue