khoj-ai / khoj

Your AI second brain. Self-hostable. Get answers from the web or your docs. Build custom agents, schedule automations, do deep research. Turn any online or local LLM into your personal, autonomous AI (e.g gpt, claude, gemini, llama, qwen, mistral).
https://khoj.dev
GNU Affero General Public License v3.0
14.17k stars 705 forks source link

khoj.el: Failed to force update all content index. Status: http 400. Response: {"detail":"There was an error parsing the body"} #602

Closed HyunggyuJang closed 8 months ago

HyunggyuJang commented 10 months ago

Met this error from (the latest) emacs client. Tried with self-hosted server, setup with docker.

Confirmed that this persists also for khoj cloud server.

debanjum commented 10 months ago

Hey @HyunggyuJang, thanks for sharing the issue and clarifying that it persists across self-hosted with docker and khoj cloud.

Can you share how you've configured Khoj in your emacs config (init.el)?

For reference, my khoj setup in emacs init.el look like below (using straight.el):

(use-package khoj
  :after org
  :straight (khoj
             :type git
             :host github
             :repo "khoj-ai/khoj"
             :files ("src/interface/emacs/khoj.el"))
  :bind ("C-c s" . 'khoj)
  :config (setq
           khoj-server-url "https://app.khoj.dev"
           khoj-api-key <my-khoj-api-key>
           khoj-index-files '("~/Documents/Notes/Incoming.org" "~/Documents/Notes/Tasks.org")))
HyunggyuJang commented 10 months ago

Sure, here it is

  (use-package khoj
    :after org
    :config (setq khoj-index-directories (list org-directory)
                  khoj-index-files nil
                  khoj-api-key <api-key>))

For the khoj cloud usage, and

  (use-package khoj
    :after org
    :config (setq khoj-index-directories (list org-directory)
                  khoj-index-files nil
                  khoj-server-url "http://127.0.0.1:42110"
                  khoj-api-key <api-key>))

for self host.

debanjum commented 8 months ago

Hey @HyunggyuJang, could you check if the issue is resolved for you with the the latest khoj.el? The indexing error should have been fixed in 392df40f361b76ef343f3653289f4d20085093c0.

HyunggyuJang commented 8 months ago

Thanks! I will check it.

debanjum commented 8 months ago

Hey @HyunggyuJang I'll mark this issue as closed for now. Please feel free to reopen it if you are still hitting this issue