mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 21:19:12 +00:00
Use new schema to update khoj.yml config from khoj.el
This commit is contained in:
@@ -439,11 +439,8 @@ CONFIG is json obtained from Khoj config API."
|
||||
(message "khoj.el: Chat not configured yet.")
|
||||
(setq config (delq (assoc 'processor config) config))
|
||||
(cl-pushnew `(processor . ((conversation . ((conversation-logfile . ,(format "%s/conversation.json" default-chat-dir))
|
||||
(openai . (
|
||||
(chat-model . ,chat-model)
|
||||
(api-key . ,khoj-openai-api-key)
|
||||
))
|
||||
))))
|
||||
(openai . ((chat-model . ,chat-model)
|
||||
(api-key . ,khoj-openai-api-key)))))))
|
||||
config))
|
||||
|
||||
((not (alist-get 'conversation (alist-get 'processor config)))
|
||||
@@ -451,8 +448,8 @@ CONFIG is json obtained from Khoj config API."
|
||||
(let ((new-processor-type (alist-get 'processor config)))
|
||||
(setq new-processor-type (delq (assoc 'conversation new-processor-type) new-processor-type))
|
||||
(cl-pushnew `(conversation . ((conversation-logfile . ,(format "%s/conversation.json" default-chat-dir))
|
||||
(chat-model . ,chat-model)
|
||||
(openai-api-key . ,khoj-openai-api-key)))
|
||||
(openai . ((chat-model . ,chat-model)
|
||||
(api-key . ,khoj-openai-api-key)))))
|
||||
new-processor-type)
|
||||
(setq config (delq (assoc 'processor config) config))
|
||||
(cl-pushnew `(processor . ,new-processor-type) config)))
|
||||
@@ -465,8 +462,8 @@ CONFIG is json obtained from Khoj config API."
|
||||
(new-processor-type (alist-get 'processor config)))
|
||||
(setq new-processor-type (delq (assoc 'conversation new-processor-type) new-processor-type))
|
||||
(cl-pushnew `(conversation . ((conversation-logfile . ,(format "%s/conversation.json" chat-directory))
|
||||
(chat-model . ,khoj-chat-model)
|
||||
(openai-api-key . ,khoj-openai-api-key)))
|
||||
(openai . ((chat-model . ,khoj-chat-model)
|
||||
(api-key . ,khoj-openai-api-key)))))
|
||||
new-processor-type)
|
||||
(setq config (delq (assoc 'processor config) config))
|
||||
(cl-pushnew `(processor . ,new-processor-type) config))))
|
||||
|
||||
Reference in New Issue
Block a user