s-kostyaev / elisa

ELISA (Emacs Lisp Information System Assistant) is a system designed to provide informative answers to user queries by leveraging a Retrieval Augmented Generation (RAG) approach.
GNU General Public License v3.0
80 stars 4 forks source link

quotes popup in minibuffer #24

Open oatmealm opened 1 month ago

oatmealm commented 1 month ago

Quote might randomly popup in the minibuffer. This is a query against one single directory collection with about 15 plain text documents.

This might have something to do with the length the query (user's prompt) if a shorter prompt instead it seem to not happen and I get an answer.

in Messages

$\207 [Give me a detailed biography of [Some person], using as many sources as possible. Quote from each source you're using. elisa-chat-prompt-template elisa-chat-provider mapc #[257 \211@\211\205   \0A@\211\205\0AA@\211\205,\0\300\267\202+\0\301\211#\207\302"\207\303"\207\304\207 [#s(hash-table size 3 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (web 27 file 33 info 38)) ellama-context-add-webpage-quote-noninteractive ellama-context-add-file-quote-noninteractive ellama-context-add-info-node-quote-noninteractive nil] 8 

(fn ROW)] ellama-context-add-text No related documents found. ellama-chat format nil :provider] 6 

(fn RESULT)]: Wrong type argument: sequencep, expression:
error in process filter: async-read-from-client: Selecting deleted buffer
error in process filter: Selecting deleted buffer

image

oatmealm commented 1 month ago

Seeing this in trace. Not sure why read-passwd is invoked... the api call is to a server on my LAN (ollama) and now password is required AFAIK (in case it's related to auth-sources some how... the collection is of a directory.

When I disable all collections, create a new empty one and add the plain text file which is causing the problem, elisa doesn't break but all queries return "not enough data"...

Debugger entered--Lisp error: (scan-error "Unbalanced parentheses" 3274 1)
  scan-sexps(3276 -1)
  forward-sexp(-1 nil)
  backward-sexp()
  async-when-done(#<process emacs> "finished\n")
  read-passwd("Other parts of the militia plan could not be based...")
  async-read-from-client(#<process emacs> "\n((\"file\" \"/home/xxx/Nextcloud/knowledge/unpc-rese..." t)
  #f(compiled-function (proc string) #<bytecode 0x1aabd9ab714c2fd1>)(#<process emacs> "\n((\"file\" \"/home/xxx/Nextcloud/knowledge/unpc-rese...")