fix: prompt deep copy

This commit is contained in:
wanglei
2024-11-16 16:01:23 +08:00
committed by Ilayaperumal Gopinathan
parent 3b430a5bee
commit 79ce1c1193

View File

@@ -112,7 +112,7 @@ public class Prompt implements ModelRequest<List<Message>> {
}
public Prompt copy() {
return new Prompt(instructionsCopy(), this.chatOptions);
return new Prompt(instructionsCopy(), null == this.chatOptions ? null : this.chatOptions.copy());
}
private List<Message> instructionsCopy() {