File tree Expand file tree Collapse file tree 2 files changed +8
-16
lines changed
integration-test/llm_mock Expand file tree Collapse file tree 2 files changed +8
-16
lines changed Original file line number Diff line number Diff line change 180180 (hk/close ch)))))
181181
182182(defn ^:private chat-title-text-0 [ch]
183- (sse-send! ch " response.output_text.delta"
184- {:type " response.output_text.delta" :delta " Some Cool" })
185- (sse-send! ch " response.output_text.delta"
186- {:type " response.output_text.delta" :delta " Title" })
187- (sse-send! ch " response.completed"
188- {:type " response.completed"
189- :response {:output []
190- :usage {:input_tokens 5
191- :output_tokens 10 }
192- :status " completed" }})
193- (hk/close ch))
183+ (hk/send! ch
184+ (json/generate-string
185+ {:output [{:content [{:text " Some Cool Title" }]}]})
186+ true ))
194187
195188(defn handle-openai-responses [req]
196189 (let [body (some-> (slurp (:body req))
Original file line number Diff line number Diff line change 9090 (hk/close ch))
9191
9292(defn ^:private chat-title-text-0 [ch]
93- (send-sse! ch {:choices [{:delta {:content " Some Cool" }}]})
94- (send-sse! ch {:choices [{:delta {:content " Title" }}]})
95- (send-sse! ch {:usage {:prompt_tokens 5 :completion_tokens 10 }})
96- (send-sse! ch {:choices [{:delta {} :finish_reason " stop" }]})
97- (hk/close ch))
93+ (hk/send! ch
94+ (json/generate-string
95+ {:choices [{:message {:content " Some Cool Title" }}]})
96+ true ))
9897
9998(defn handle-openai-chat [req]
10099 ; ; Capture and normalize the request body for assertions in tests
You can’t perform that action at this time.
0 commit comments