diff --git a/src/ie/simm/runtimes/assistance.clj b/src/ie/simm/runtimes/assistance.clj index cf6442d..133fe5c 100644 --- a/src/ie/simm/runtimes/assistance.clj +++ b/src/ie/simm/runtimes/assistance.clj @@ -25,60 +25,69 @@ [clojure.test :as ct]) (:import [java.util.zip ZipEntry ZipOutputStream])) -(defn summarize [S conn conv chat] - (go-try S - (debug "=========================== SUMMARIZING ===============================") - (let [db @conn - summarization (> (d/q '[:find ?d ?e - :in $ ?chat - :where - [?c :chat/id ?chat] - [?e :message/chat ?c] - [?e :message/date ?d]] - db (:id chat)) - (sort-by first) - (take-last window-size) - (map second)) - note-titles (extract-links summarization) - _ (debug "=========================== CREATING NOTES ===============================") - new-notes - (> (d/q '[:find ?d ?e + :in $ ?chat + :where + [?c :chat/id ?chat] + [?e :message/chat ?c] + [?e :message/date ?d]] + db (:id chat)) + (sort-by first) + (take-last window-size) + (map second)) + note-titles (extract-links summarization) + _ (debug "=========================== CREATING NOTES ===============================") + new-notes + (