mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-06 21:29:12 +00:00
Update Chat API, Logs, Interfaces to store, use references as list
- Remove the need to split by magic string in emacs and chat interfaces - Move compiling references into string as context for GPT to GPT layer - Update setup in tests to use new style of setting references - Name first argument to converse as more appropriate "references"
This commit is contained in:
@@ -443,9 +443,8 @@ RECEIVE-DATE is the message receive date."
|
||||
(let* ((message (cdr (or (assoc 'response json-response) (assoc 'message json-response))))
|
||||
(sender (cdr (assoc 'by json-response)))
|
||||
(receive-date (cdr (assoc 'created json-response)))
|
||||
(context (or (cdr (assoc 'context json-response)) ""))
|
||||
(reference-source-texts (split-string context "\n\n# " t))
|
||||
(footnotes (mapcar #'khoj--generate-reference reference-source-texts))
|
||||
(references (or (cdr (assoc 'context json-response)) '()))
|
||||
(footnotes (mapcar #'khoj--generate-reference references))
|
||||
(footnote-links (mapcar #'car footnotes))
|
||||
(footnote-defs (mapcar #'cdr footnotes)))
|
||||
(thread-first
|
||||
|
||||
Reference in New Issue
Block a user