Client.Timeout or context cancellation while reading body
teslapatrick opened this issue · 1 comments
teslapatrick commented
Line 40 in 3c4e9fb
Can we increase the timeout period or set the environmental variable? Sometimes there will be a timeout when encountering extensive data.
Failed to complete: context deadline exceeded (Client.Timeout or context cancellation while reading body)
rakyll commented
You can provide a custom timeout by using a custom HTTPClient.
sess := openai.NewSession(....)
sess.HTTPClient = &http.Client{
Timeout: 120 * time.Second,
}