You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Initializing a Client with a custom HTTP client always requires first creating a useless reqwest::Client in Client::with_config.
This adds a bit of useless overhead due to reqwest's TLS/DNS functionality, which can be non-trivial for certain low-latency applications.
Would you be open to adding an additional method along the lines of?
impl<C:Config>Client<C>{/// Create client with your own HTTP client, config, and backoff pubfnbuild(http_client: reqwest::Client,config:C,backoff: backoff::ExponentialBackoff) -> Self{Self{
http_client,
config,
backoff,}}
...
The text was updated successfully, but these errors were encountered:
During initialization, among other things, a reqwest client seems to initialize its TLS backend ref. In certain scenarios (at least for me: tiny VM with shared core + legacy backend), this seems to take a non-trivial amount of time. I observed ~30ms earlier this week. And with the current async-openai implementation, it wasn't possible to easily circumvent this dummy initialization.
Initializing a
Client
with a custom HTTP client always requires first creating a uselessreqwest::Client
inClient::with_config
.This adds a bit of useless overhead due to
reqwest
's TLS/DNS functionality, which can be non-trivial for certain low-latency applications.Would you be open to adding an additional method along the lines of?
The text was updated successfully, but these errors were encountered: