Replies: 1 comment
-
@eric-chao please refer to the last example in the README: config := openai.DefaultConfig("token")
proxyUrl, err := url.Parse("http://localhost:{port}")
if err != nil {
panic(err)
}
transport := &http.Transport{
Proxy: http.ProxyURL(proxyUrl),
}
config.HTTPClient = &http.Client{
Transport: transport,
Timeout: 5 * time.Second,
}
c := openai.NewClientWithConfig(config) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How to create ClientConfig instance?
Or How to use customized http.Client, and use different parameters, like timeout?
Beta Was this translation helpful? Give feedback.
All reactions