Skip to content

Commit f1fdada

Browse files
committed
feat: Add getTextContent method to retrieve message text content
Signed-off-by: liugddx <[email protected]>
1 parent 348085a commit f1fdada

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

spring-ai-model/src/main/java/org/springframework/ai/chat/messages/AbstractMessage.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,15 @@ public String getText() {
108108
return this.textContent;
109109
}
110110

111+
/**
112+
* Get the text content of the message.
113+
* @return the text content of the message
114+
*/
115+
@Nullable
116+
public String getTextContent() {
117+
return this.textContent;
118+
}
119+
111120
/**
112121
* Get the metadata of the message.
113122
* @return the metadata of the message

0 commit comments

Comments
 (0)