Skip to content

Commit 1344364

Browse files
Update AdvisedRequest.java
systemMessage should come first index
1 parent 35f46e9 commit 1344364

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-ai-core/src/main/java/org/springframework/ai/chat/client/advisor/api/AdvisedRequest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public Prompt toPrompt() {
153153
if (!CollectionUtils.isEmpty(this.systemParams())) {
154154
processedSystemText = new PromptTemplate(processedSystemText, this.systemParams()).render();
155155
}
156-
messages.add(new SystemMessage(processedSystemText));
156+
messages.add(0,new SystemMessage(processedSystemText));
157157
}
158158

159159
String formatParam = (String) this.adviseContext().get("formatParam");

0 commit comments

Comments
 (0)