Skip to content

Commit 9be14a3

Browse files
committed
Update docs
1 parent 4a28182 commit 9be14a3

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

docs/guides/ORCHESTRATION_CHAT_COMPLETION.md

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,7 @@ The LLM response is available as the first choice under the `result.getOrchestra
102102
Use a prepared template and execute requests with by passing only the input parameters:
103103

104104
```java
105-
var template =
106-
ChatMessage.create()
107-
.role("user")
108-
.content("Reply with 'Orchestration Service is working!' in {{?language}}");
105+
var template = Message.user("Reply with 'Orchestration Service is working!' in {{?language}}");
109106
var templatingConfig = TemplatingModuleConfig.create().template(template);
110107
var configWithTemplate = config.withTemplateConfig(templatingConfig);
111108

@@ -124,10 +121,10 @@ Include a message history to maintain context in the conversation:
124121
```java
125122
var messagesHistory =
126123
List.of(
127-
ChatMessage.create().role("user").content("What is the capital of France?"),
128-
ChatMessage.create().role("assistant").content("The capital of France is Paris."));
124+
Message.user("What is the capital of France?"),
125+
Message.assistant("The capital of France is Paris."));
129126
var message =
130-
ChatMessage.create().role("user").content("What is the typical food there?");
127+
Message.user("What is the typical food there?");
131128

132129
var prompt = new OrchestrationPrompt(message).messageHistory(messagesHistory);
133130

@@ -175,12 +172,8 @@ var maskingConfig =
175172
DpiMasking.anonymization().withEntities(DPIEntities.PHONE, DPIEntities.PERSON);
176173
var configWithMasking = config.withMaskingConfig(maskingConfig);
177174

178-
var systemMessage = ChatMessage.create()
179-
.role("system")
180-
.content("Please evaluate the following user feedback and judge if the sentiment is positive or negative.");
181-
var userMessage = ChatMessage.create()
182-
.role("user")
183-
.content("""
175+
var systemMessage = Message.system("Please evaluate the following user feedback and judge if the sentiment is positive or negative.");
176+
var userMessage = Message.user("""
184177
I think the SDK is good, but could use some further enhancements.
185178
My architect Alice and manager Bob pointed out that we need the grounding capabilities, which aren't supported yet.
186179
""");

0 commit comments

Comments
 (0)