This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-12-22
Channels
- # adventofcode (12)
- # announcements (6)
- # aws (5)
- # babashka (57)
- # beginners (40)
- # calva (17)
- # clojure-europe (10)
- # clojure-nl (1)
- # clojure-norway (21)
- # clojure-uk (3)
- # clojuredesign-podcast (4)
- # cursive (3)
- # datomic (9)
- # etaoin (5)
- # fulcro (12)
- # hyperfiddle (42)
- # missionary (2)
- # off-topic (11)
- # reagent (6)
- # scittle (131)
- # squint (3)
- # tools-deps (4)
- # uncomplicate (1)
- # vscode (1)
llms + missionary is 🔥
(let [chan (api/create-chat-completion
{:model "gpt-4-1106-preview"
:messages [#_{:role "system" :content "empty"}
{:role "user" :content s}]
:temperature 0
:stream true
})]
(->> (channel-flow chan)
(m/eduction (take-while #(not= :done %))
(map #(get-in % [:choices 0 :delta :content])))
(m/reductions str)
(m/relieve {})))
👍 3
channel-flow as defined here https://github.com/leonoel/missionary/wiki/Creating-flows