wkok / openai-clojure

Clojure functions to drive the OpenAI API
https://cljdoc.org/d/net.clojars.wkok/openai-clojure
MIT License
208 stars 28 forks source link

How do you handle request timeout? #69

Closed HanjoPurebuddha closed 2 months ago

HanjoPurebuddha commented 3 months ago

Hey thanks so much for the library, I've been using it a ton.

My requests seem to just kind of stall sometimes. Is there a way to submit a timeout after 2 minutes and retry?

wkok commented 2 months ago

Apologies for not responding sooner. You've closed the issue already so you're probably sorted, but for completeness we can specify request timeout in the request options, see https://cljdoc.org/d/net.clojars.wkok/openai-clojure/0.19.0/doc/usage-azure-openai#request-options

HanjoPurebuddha commented 2 months ago

Thanks! This is exactly what I needed.