Skip to content

Commit

Permalink
Fix error message rendering in khoj.el, khoj obsidian chat
Browse files Browse the repository at this point in the history
- Fix failed to index error message in khoj.el
- Fix chat model not configured message in khoj obsidian chat
  • Loading branch information
debanjum committed Jan 11, 2024
1 parent 02187b1 commit ffdb291
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/interface/emacs/khoj.el
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ Auto invokes setup steps on calling main entrypoint."
(khoj--delete-open-network-connections-to-server)
(with-current-buffer (current-buffer)
(search-forward "\n\n" nil t)
(message "khoj.el: Failed to %supdate %s content index. Status: %s%s"
(message "khoj.el: Failed to %supdate %scontent index. Status: %s%s"
(if force "force " "")
(if content-type (format "%s " content-type) "all")
(string-trim (format "%s %s" (nth 1 (nth 1 status)) (nth 2 (nth 1 status))))
Expand Down
2 changes: 1 addition & 1 deletion src/interface/obsidian/src/chat_modal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export class KhojChatModal extends Modal {
if (responseJson.detail) {
// If the server returns error details in response, render a setup hint.
let setupMsg = "Hi 👋🏾, to start chatting add available chat models options via [the Django Admin panel](/server/admin) on the Server";
this.renderMessage(chatBodyEl, setupMsg, "khoj", undefined, true);
this.renderMessage(chatBodyEl, setupMsg, "khoj", undefined);

return false;
} else if (responseJson.response) {
Expand Down
2 changes: 1 addition & 1 deletion src/khoj/routers/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
from khoj.search_filter.word_filter import WordFilter
from khoj.search_type import image_search, text_search
from khoj.utils import constants, state
from khoj.utils.config import GPT4AllProcessorModel, TextSearchModel
from khoj.utils.config import GPT4AllProcessorModel
from khoj.utils.helpers import (
AsyncIteratorWrapper,
ConversationCommand,
Expand Down

0 comments on commit ffdb291

Please sign in to comment.