We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce39294 commit 832307dCopy full SHA for 832307d
README.md
@@ -81,6 +81,19 @@ OpenAiApi api = retrofit.create(OpenAiApi.class);
81
OpenAiService service = new OpenAiService(api);
82
```
83
84
+### Adding a Proxy
85
+To use a proxy, modify the OkHttp client as shown below:
86
+```java
87
+ObjectMapper mapper = defaultObjectMapper();
88
+Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(host, port));
89
+OkHttpClient client = defaultClient(token, timeout)
90
+ .newBuilder()
91
+ .proxy(proxy)
92
+ .build();
93
+Retrofit retrofit = defaultRetrofit(client, mapper);
94
+OpenAiApi api = retrofit.create(OpenAiApi.class);
95
+OpenAiService service = new OpenAiService(api);
96
+```
97
98
99
0 commit comments