diff --git a/src/wkok/openai_clojure/sse.clj b/src/wkok/openai_clojure/sse.clj index 17ae4da..440400c 100644 --- a/src/wkok/openai_clojure/sse.clj +++ b/src/wkok/openai_clojure/sse.clj @@ -170,7 +170,13 @@ (if async? - ((:leave martian.hato/perform-request-async) ctx') + (-> ((:leave martian.hato/perform-request-async) ctx') + (update :response + #(.thenApply + % + (reify java.util.function.Function + (apply [_ response'] + (:body response')))))) (assoc ctx :response (if (:stream params) (sse-request ctx')