Skip to content

Commit 46fe11d

Browse files
authored
fix: [Orchestration] Hide constructors for System- and UserMessage (#334)
* Hide constructors for System- and UserMessage * Update release_notes --------- Co-authored-by: Jonas Israel <[email protected]>
1 parent 0c7d768 commit 46fe11d

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

docs/release-notes/release_notes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
### 🔧 Compatibility Notes
1010

11-
-
11+
- The constructors `UserMessage(MessageContent)` and `SystemMessage(MessageContent)` are removed. Use `Message.user(String)`, `Message.user(ImageItem)`, or `Message.system(String)` instead.
1212

1313
### ✨ New Functionality
1414

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,17 @@
44
import java.util.LinkedList;
55
import java.util.List;
66
import javax.annotation.Nonnull;
7+
import lombok.AccessLevel;
78
import lombok.Getter;
9+
import lombok.RequiredArgsConstructor;
810
import lombok.Value;
911
import lombok.experimental.Accessors;
1012
import lombok.experimental.Tolerate;
1113

1214
/** Represents a chat message as 'system' to the orchestration service. */
1315
@Value
1416
@Accessors(fluent = true)
17+
@RequiredArgsConstructor(access = AccessLevel.PACKAGE)
1518
public class SystemMessage implements Message {
1619

1720
/** The role of the assistant. */

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,17 @@
44
import java.util.LinkedList;
55
import java.util.List;
66
import javax.annotation.Nonnull;
7+
import lombok.AccessLevel;
78
import lombok.Getter;
9+
import lombok.RequiredArgsConstructor;
810
import lombok.Value;
911
import lombok.experimental.Accessors;
1012
import lombok.experimental.Tolerate;
1113

1214
/** Represents a chat message as 'user' to the orchestration service. */
1315
@Value
1416
@Accessors(fluent = true)
17+
@RequiredArgsConstructor(access = AccessLevel.PACKAGE)
1518
public class UserMessage implements Message {
1619

1720
/** The role of the assistant. */

0 commit comments

Comments
 (0)