Skip to content

Commit 79ce1c1

Browse files
csuwlilayaperumalg
authored andcommitted
fix: prompt deep copy
1 parent 3b430a5 commit 79ce1c1

File tree

1 file changed

+1
-1
lines changed
  • spring-ai-core/src/main/java/org/springframework/ai/chat/prompt

1 file changed

+1
-1
lines changed

spring-ai-core/src/main/java/org/springframework/ai/chat/prompt/Prompt.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public int hashCode() {
112112
}
113113

114114
public Prompt copy() {
115-
return new Prompt(instructionsCopy(), this.chatOptions);
115+
return new Prompt(instructionsCopy(), null == this.chatOptions ? null : this.chatOptions.copy());
116116
}
117117

118118
private List<Message> instructionsCopy() {

0 commit comments

Comments
 (0)