Skip to content

Commit 2fa79e0

Browse files
committed
Initial
1 parent d2c65bb commit 2fa79e0

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

docs/guides/ORCHESTRATION_CHAT_COMPLETION.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,11 +219,11 @@ Change your LLM configuration to add model parameters:
219219
```java
220220
OrchestrationAiModel customGPT4O =
221221
OrchestrationAiModel.GPT_4O
222-
.withModelParams(
222+
.withParams(
223223
Map.of(
224224
"max_tokens", 50,
225225
"temperature", 0.1,
226226
"frequency_penalty", 0,
227227
"presence_penalty", 0))
228-
.withModelVersion("2024-05-13");
228+
.withVersion("2024-05-13");
229229
```

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
@AllArgsConstructor
1414
public class OrchestrationAiModel {
1515
/** The name of the model */
16-
String modelName;
16+
String name;
1717

1818
/**
1919
* Optional parameters on this model.
@@ -26,10 +26,10 @@ public class OrchestrationAiModel {
2626
* "presence_penalty", 0)
2727
* }</pre>
2828
*/
29-
Map<String, Object> modelParams;
29+
Map<String, Object> params;
3030

3131
/** The version of the model, defaults to "latest". */
32-
String modelVersion;
32+
String version;
3333

3434
/** IBM Granite 13B chat completions model */
3535
public static final OrchestrationAiModel IBM_GRANITE_13B_CHAT =
@@ -106,15 +106,15 @@ public class OrchestrationAiModel {
106106
public static final OrchestrationAiModel GEMINI_1_5_FLASH =
107107
new OrchestrationAiModel("gemini-1.5-flash");
108108

109-
OrchestrationAiModel(@Nonnull final String modelName) {
110-
this(modelName, Map.of(), "latest");
109+
OrchestrationAiModel(@Nonnull final String name) {
110+
this(name, Map.of(), "latest");
111111
}
112112

113113
@Nonnull
114114
LLMModuleConfig createConfig() {
115115
return new LLMModuleConfig()
116-
.modelName(modelName)
117-
.modelParams(modelParams)
118-
.modelVersion(modelVersion);
116+
.modelName(name)
117+
.modelParams(params)
118+
.modelVersion(version);
119119
}
120120
}

orchestration/src/test/java/com/sap/ai/sdk/orchestration/OrchestrationUnitTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
@WireMockTest
6464
class OrchestrationUnitTest {
6565
static final OrchestrationAiModel CUSTOM_GPT_35 =
66-
GPT_35_TURBO_16K.withModelParams(
66+
GPT_35_TURBO_16K.withParams(
6767
Map.of(
6868
"max_tokens", 50,
6969
"temperature", 0.1,

0 commit comments

Comments
 (0)