Open Xxm-YX opened 5 months ago
change base url, sample code: ObjectMapper mapper = defaultObjectMapper(); OkHttpClient client = defaultClient(apiKey, Duration.of(timeout, ChronoUnit.SECONDS)) .newBuilder() .build(); Retrofit retrofit = OpenAiService.defaultRetrofit(client, mapper) .newBuilder() .baseUrl(baseUrl) .build(); OpenAiApi api = retrofit.create(OpenAiApi.class); OpenAiService service = new OpenAiService(api);
I used an nginx proxy server.
Nginx access_log
Console log
I use nginx as a proxy to request data from Google and YouTube, and it returns data normally.