Decouple results shown to user and text the model is trained on

- Previously:
  The text the model was trained on was being used to
  re-create a semblance of the original org-mode entry.

- Now:
  - Store raw entry as another key:value in each entry json too
    Only return actual raw org entries in results
    But create embeddings like before
  - Also add link to entry in file:<filename>::<line_number> form
    in property drawer of returned results
    This can be used to jump to actual entry in it's original file
This commit is contained in:
Debanjum Singh Solanky
2021-08-29 05:47:43 -07:00
parent 7ee3007070
commit f4bde75249
4 changed files with 20 additions and 20 deletions

View File

@@ -48,7 +48,7 @@
;; extract entries from response as single string and convert to entries
(format "%s"
(mapcar
(lambda (args) (format "* %s" (cdr (assoc 'Entry args))))
(lambda (args) (format "%s" (cdr (assoc 'Entry args))))
json-response))))
(defun semantic-search--extract-entries-as-ledger (json-response)