Skip to content

Commit c0723c1

Browse files
committed
Fix new checkstyle violations
1 parent dc47859 commit c0723c1

File tree

13 files changed

+38
-5
lines changed

13 files changed

+38
-5
lines changed

.pipeline/checkstyle-suppressions.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<suppress files="[/\\]registry[/\\]client[/\\]" checks=".*"/>
1616
<suppress files="[/\\]registry[/\\]model[/\\]" checks=".*"/>
1717
<!-- Suppress TODOs -->
18-
<suppress files="OpenAiChatMessage.java" checks="TodoComment" lines="257,7" />
18+
<suppress files="OpenAiChatMessage.java" checks="TodoComment" lines="261,7" />
1919
<suppress files="ChatCompletionResponseMessage.java" checks="TodoComment" lines="53,34" />
2020
<suppress files="CreateChatCompletionRequest.java" checks="TodoComment" lines="73,47" />
2121
</suppressions>

core/src/main/java/com/sap/ai/sdk/core/common/ClientResponseHandler.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public class ClientResponseHandler<T, E extends ClientException>
4444
* Set the {@link ObjectMapper} to use for parsing JSON responses.
4545
*
4646
* @param jackson The {@link ObjectMapper} to use
47+
* @return the current instance of {@link ClientResponseHandler} with the changed object mapper
4748
*/
4849
@Beta
4950
@Nonnull

core/src/main/java/com/sap/ai/sdk/core/common/ClientStreamingHandler.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public class ClientStreamingHandler<D extends StreamedDelta, E extends ClientExc
2525
* Set the {@link ObjectMapper} to use for parsing JSON responses.
2626
*
2727
* @param jackson The {@link ObjectMapper} to use
28+
* @return the current instance of {@link ClientStreamingHandler} with the changed object mapper
2829
*/
2930
@Nonnull
3031
public ClientStreamingHandler<D, E> objectMapper(@Nonnull final ObjectMapper jackson) {

core/src/main/java/com/sap/ai/sdk/core/common/StreamedDelta.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ public interface StreamedDelta {
3737
* <p>{@code content_filter}: Omitted content due to a flag from our content filters
3838
*
3939
* <p>{@code null}: API response still in progress or incomplete
40+
*
41+
* @return the finish reason or null.
4042
*/
4143
@Nullable
4244
String getFinishReason();

foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiClient.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ public OpenAiClient withApiVersion(@Nonnull final String apiVersion) {
9797
*
9898
* @param destination The specific {@link HttpDestination} to use.
9999
* @see AiCoreService#getInferenceDestination(String)
100+
* @return a new OpenAI client.
100101
*/
101102
@Beta
102103
@Nonnull

foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/model/OpenAiChatMessage.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,11 @@ public OpenAiChatUserMessage addContent(@Nonnull final ContentPart... content) {
146146
@Type(value = ContentPartImage.class, name = "image_url")
147147
})
148148
public interface ContentPart {
149-
/** Get the type of the content part. */
149+
/**
150+
* Get the type of the content part.
151+
*
152+
* @return The type of the content part as string.
153+
*/
150154
@Nonnull
151155
String getType();
152156
}

orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationClient.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ public OrchestrationChatResponse chatCompletion(
102102
* Generate a completion for the given prompt.
103103
*
104104
* @param prompt a text message.
105-
* @return A stream of message deltas
105+
* @param config the configuration to use
106+
* @return a stream of message deltas
106107
* @throws OrchestrationClientException if the request fails or if the finish reason is
107108
* content_filter
108109
* @since 1.1.0

orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationModuleConfig.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ public OrchestrationModuleConfig withMaskingConfig(
140140
* @link <a
141141
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/input-filtering">SAP
142142
* AI Core: Orchestration - Input Filtering</a>
143-
* @param contentFilters one or more content filters to apply to the input.
143+
* @param contentFilter a filter to apply to the input.
144+
* @param contentFilters zero or more additional content filters to apply to the input.
144145
* @return a new {@code OrchestrationModuleConfig} instance with the specified input filters
145146
* added.
146147
*/
@@ -174,7 +175,8 @@ public OrchestrationModuleConfig withInputFiltering(
174175
* @link <a
175176
* href="https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/output-filtering">SAP
176177
* AI Core: Orchestration - Output Filtering</a>
177-
* @param contentFilters one or more content filters to apply to the output.
178+
* @param contentFilter a filter to apply to the input.
179+
* @param contentFilters zero or more additional content filters to apply to the input.
178180
* @return a new {@code OrchestrationModuleConfig} instance with the specified output filters
179181
* added.
180182
*/

orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationPrompt.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public OrchestrationPrompt(@Nonnull final Message message, @Nonnull final Messag
4949
* Initialize a prompt based on template variables.
5050
*
5151
* @param inputParams The input parameters as entries of template variables and their contents.
52+
* @param messages The messages to be sent to the orchestration service.
5253
*/
5354
public OrchestrationPrompt(
5455
@Nonnull final Map<String, String> inputParams, @Nonnull final Message... messages) {
@@ -60,6 +61,7 @@ public OrchestrationPrompt(
6061
* Set the chat history of this prompt.
6162
*
6263
* @param messagesHistory The chat history to add.
64+
* @return The current instance of {@link OrchestrationPrompt} with the changed chat history.
6365
*/
6466
@Nonnull
6567
public OrchestrationPrompt messageHistory(@Nonnull final List<Message> messagesHistory) {

orchestration/src/main/java/com/sap/ai/sdk/orchestration/spring/OrchestrationChatModel.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public OrchestrationChatModel() {
5555
/**
5656
* Constructor with a custom client.
5757
*
58+
* @param client The custom client to use.
5859
* @since 1.2.0
5960
*/
6061
public OrchestrationChatModel(@Nonnull final OrchestrationClient client) {

0 commit comments

Comments
 (0)