From 897a4114f516ceb3c82f09efb18e2e2189058c35 Mon Sep 17 00:00:00 2001 From: inpink Date: Mon, 9 Sep 2024 19:59:22 +0900 Subject: [PATCH] Fix Javadoc comments in OpenAiAudioApi and OpenAiApi - Correct OpenAiAudioApi Javadoc: remove chat completion reference - Add missing @param for webClientBuilder in OpenAiApi constructor --- .../java/org/springframework/ai/openai/api/OpenAiApi.java | 8 ++++++++ .../org/springframework/ai/openai/api/OpenAiAudioApi.java | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/api/OpenAiApi.java b/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/api/OpenAiApi.java index d805bd1fb2..619b105a7c 100644 --- a/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/api/OpenAiApi.java +++ b/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/api/OpenAiApi.java @@ -93,6 +93,7 @@ public OpenAiApi(String baseUrl, String apiKey) { * @param baseUrl api base URL. * @param apiKey OpenAI apiKey. * @param restClientBuilder RestClient builder. + * @param webClientBuilder WebClient builder. */ public OpenAiApi(String baseUrl, String apiKey, RestClient.Builder restClientBuilder, WebClient.Builder webClientBuilder) { @@ -104,6 +105,7 @@ public OpenAiApi(String baseUrl, String apiKey, RestClient.Builder restClientBui * @param baseUrl api base URL. * @param apiKey OpenAI apiKey. * @param restClientBuilder RestClient builder. + * @param webClientBuilder WebClient builder. * @param responseErrorHandler Response error handler. */ public OpenAiApi(String baseUrl, String apiKey, RestClient.Builder restClientBuilder, @@ -116,7 +118,10 @@ public OpenAiApi(String baseUrl, String apiKey, RestClient.Builder restClientBui * Create a new chat completion api. * @param baseUrl api base URL. * @param apiKey OpenAI apiKey. + * @param completionsPath the path to the chat completions endpoint. + * @param embeddingsPath the path to the embeddings endpoint. * @param restClientBuilder RestClient builder. + * @param webClientBuilder WebClient builder. * @param responseErrorHandler Response error handler. */ public OpenAiApi(String baseUrl, String apiKey, String completionsPath, String embeddingsPath, @@ -132,7 +137,10 @@ public OpenAiApi(String baseUrl, String apiKey, String completionsPath, String e * @param baseUrl api base URL. * @param apiKey OpenAI apiKey. * @param headers the http headers to use. + * @param completionsPath the path to the chat completions endpoint. + * @param embeddingsPath the path to the embeddings endpoint. * @param restClientBuilder RestClient builder. + * @param webClientBuilder WebClient builder. * @param responseErrorHandler Response error handler. */ public OpenAiApi(String baseUrl, String apiKey, MultiValueMap headers, String completionsPath, diff --git a/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/api/OpenAiAudioApi.java b/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/api/OpenAiAudioApi.java index 23b27f372d..83dee8850b 100644 --- a/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/api/OpenAiAudioApi.java +++ b/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/api/OpenAiAudioApi.java @@ -62,7 +62,7 @@ public OpenAiAudioApi(String openAiToken) { } /** - * Create an new chat completion api. + * Create a new audio api. * @param baseUrl api base URL. * @param openAiToken OpenAI apiKey. * @param restClientBuilder RestClient builder. @@ -81,7 +81,7 @@ public OpenAiAudioApi(String baseUrl, String openAiToken, RestClient.Builder res } /** - * Create an new chat completion api. + * Create a new audio api. * @param baseUrl api base URL. * @param apiKey OpenAI apiKey. * @param restClientBuilder RestClient builder. @@ -96,7 +96,7 @@ public OpenAiAudioApi(String baseUrl, String apiKey, RestClient.Builder restClie } /** - * Create an new chat completion api. + * Create a new audio api. * @param baseUrl api base URL. * @param apiKey OpenAI apiKey. * @param headers the http headers to use.