We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ee9424e commit ba6fd51Copy full SHA for ba6fd51
README.md
@@ -165,3 +165,25 @@ func main() {
165
}
166
```
167
</details>
168
+
169
+<details>
170
+<summary>Configuring proxy</summary>
171
172
+```go
173
+config := openai.DefaultConfig("token")
174
+proxyUrl, err := url.Parse("http://localhost:{port}")
175
+if err != nil {
176
+ panic(err)
177
+}
178
+transport := &http.Transport{
179
+ Proxy: http.ProxyURL(proxyUrl),
180
181
+config.HTTPClient = &http.Client{
182
+ Transport: transport,
183
184
185
+c := openai.NewClientWithConfig(config)
186
+```
187
188
+See also: https://pkg.go.dev/github.com/sashabaranov/go-openai#ClientConfig
189
+</details>
0 commit comments