Skip to content

Commit d99dc0e

Browse files
committed
Formatting
1 parent dec85d6 commit d99dc0e

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ public void setInternalToolExecutionEnabled(
6666
@Override
6767
@Nonnull
6868
public String getModel() {
69-
throw new UnsupportedOperationException("Model declaration not supported in OpenAI integration.");
69+
throw new UnsupportedOperationException(
70+
"Model declaration not supported in OpenAI integration.");
7071
}
7172

7273
@Override

sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services/SpringAiAgenticWorkflowService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.sap.ai.sdk.app.services;
22

3-
43
import com.sap.ai.sdk.foundationmodels.openai.OpenAiClient;
54
import com.sap.ai.sdk.foundationmodels.openai.OpenAiModel;
65
import com.sap.ai.sdk.foundationmodels.openai.spring.OpenAiChatModel;
@@ -24,7 +23,8 @@
2423
@Service
2524
@Slf4j
2625
public class SpringAiAgenticWorkflowService {
27-
private final ChatModel client = new OpenAiChatModel(OpenAiClient.forModel(OpenAiModel.GPT_4O_MINI));
26+
private final ChatModel client =
27+
new OpenAiChatModel(OpenAiClient.forModel(OpenAiModel.GPT_4O_MINI));
2828

2929
/**
3030
* Simple agentic workflow using chain-like structure. The agent is generating a travel itinerary

sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services/SpringAiOpenAiService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ public ChatResponse ChatMemory() {
100100
val memory = MessageWindowChatMemory.builder().chatMemoryRepository(repository).build();
101101
val advisor = MessageChatMemoryAdvisor.builder(memory).build();
102102
val cl = ChatClient.builder(chatClient).defaultAdvisors(advisor).build();
103-
val prompt1 = new Prompt("What is the capital of France?", new OpenAiChatOptions());
104-
val prompt2 = new Prompt("And what is the typical food there?", new OpenAiChatOptions());
103+
val prompt1 = new Prompt("What is the capital of France?", new OpenAiChatOptions());
104+
val prompt2 = new Prompt("And what is the typical food there?", new OpenAiChatOptions());
105105

106106
cl.prompt(prompt1).call().content();
107107
return Objects.requireNonNull(

0 commit comments

Comments
 (0)