Announcing Aimee - a Clojure library for streaming and non-streaming OpenAI compatible Chat Completions over core.async channels.
https://github.com/jhancock/aimee
https://clojars.org/net.clojars.jhancock/aimee
1 - The caller creates a core.async channel
2 - Pass the channel to start-request! with your request options. This creates a virtual thread to handle the HTTP request and result processing lifecycle.
3 - Events are written to the channel as the request progresses. Events are a map {:event <event-name> :data <data-map> }. Events types are :chunk, :complete and :error. A :chunk event is an SSE Chat Completion "chunk". At the end of any stream or non-stream request there will be a :complete event except in the case of :error.
4 - Consume events from your channel (via go-loop, , etc.
5 - Channel closes after :complete or :error
Aimee handles the chat completion request lifecycle, writes events to the channel, closes it when done and handles slow channel consumer overflow with back-pressure options. Aimee provides helper functions such as aimee.chat.ring/->ring-stream to write SSE chunks to an HTTP streaming response.
See aimee.example.chat-server for a complete working example using the latest Jetty 12.x, virtual threads, SSE streaming response.
https://github.com/weavejester/cljfmt 0.16.2 has been released and is available via direct download, Homebrew and Clojars. This release features some minor performance improvements and an option to configure the maximum allowed gap when aligning columns. Thanks go to @jonurnieta for all his recent contributions to the project.
Released latest https://github.com/mpenet/hirundo - 1.0.0-alpha212 - Adds gRPC service support