This repository was archived by the owner on Jun 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
请问支持代理地址吗? #234
Comments
|
不是用proxy,是使用第三方的代理接口地址直接代替官方的接口地址,比如 https://api.openai-proxy.com 希望可以自定义com.theokanning.openai.service.OpenAiService.BASE_URL |
If you are not sure how to use it, you can refer to this constructor — ObjectMapper mapper = OpenAiService.defaultObjectMapper();
OkHttpClient client = OpenAiService.defaultClient("sr-xxxx", Duration.ofSeconds(10));
Retrofit retrofit = new Retrofit.Builder()
.baseUrl("https://api.notopenai.com/")
.client(client)
.addConverterFactory(JacksonConverterFactory.create(mapper))
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
.build();
OpenAiService service = new OpenAiService(retrofit.create(OpenAiApi.class), client.dispatcher().executorService()); |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
就是自己搭建反向代理服务,用我的域名替换 api.openai.com
The text was updated successfully, but these errors were encountered: