MCPcopy
hub / github.com/mudler/LocalAI / WithTimeout

Function WithTimeout

pkg/httpclient/client.go:135–135  ·  view source on GitHub ↗

WithTimeout sets an overall client Timeout (covers the entire exchange including reading the body). Do NOT use this for streaming endpoints; prefer a per-request context deadline there. Equivalent to NewWithTimeout.

(d time.Duration)

Source from the content-addressed store, hash-verified

133// including reading the body). Do NOT use this for streaming endpoints; prefer
134// a per-request context deadline there. Equivalent to NewWithTimeout.
135func WithTimeout(d time.Duration) Option { return func(o *options) { o.timeout = d } }
136
137// WithTransport supplies a custom RoundTripper (e.g. an IP-pinned dialer or a
138// credential-injecting wrapper). The caller is responsible for the transport's

Callers 4

SessionsFromMCPConfigFunction · 0.92
CORSProxyEndpointFunction · 0.92
NewWithTimeoutFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected