mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-27 17:35:07 +01:00
Set no. of results used to generate chat response from Khoj Emacs
This commit is contained in:
parent
1d77fe712c
commit
bf427cd8dd
1 changed files with 2 additions and 2 deletions
|
@ -83,7 +83,7 @@
|
|||
:type 'integer)
|
||||
|
||||
(defcustom khoj-results-count 5
|
||||
"Number of results to get from Khoj API for each query."
|
||||
"Number of results to show in search and use for chat responses."
|
||||
:group 'khoj
|
||||
:type 'integer)
|
||||
|
||||
|
@ -766,7 +766,7 @@ Render results in BUFFER-NAME using QUERY, CONTENT-TYPE."
|
|||
"Send QUERY to Khoj Chat API."
|
||||
(let* ((url-request-method "GET")
|
||||
(encoded-query (url-hexify-string query))
|
||||
(query-url (format "%s/api/chat?q=%s&client=emacs" khoj-server-url encoded-query)))
|
||||
(query-url (format "%s/api/chat?q=%s&n=%s&client=emacs" khoj-server-url khoj-results-count encoded-query)))
|
||||
(with-temp-buffer
|
||||
(condition-case ex
|
||||
(progn
|
||||
|
|
Loading…
Reference in a new issue