Commit c3a3c88
springai/multimodel: capture previous response before signaling
Same bug pattern that RagApplication had: the polling loop compared
against an empty-string baseline, so the very first poll could
return the stale prior response and print it as if it were the new
one. Capture previousResponse before sending the chat signal and
wait until getLastResponse() differs from that pre-signal baseline.
Also drop the redundant initial Thread.sleep(100) — the loop's own
sleep handles backoff, and reading immediately is fine when we're
comparing against the pre-signal baseline.
Addresses Copilot review on PR #775.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 4d32397 commit c3a3c88
1 file changed
Lines changed: 6 additions & 8 deletions
File tree
- springai/multimodel/src/main/java/io/temporal/samples/springai/multimodel
Lines changed: 6 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
120 | 124 | | |
121 | | - | |
122 | | - | |
123 | 125 | | |
124 | 126 | | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
| 127 | + | |
130 | 128 | | |
131 | 129 | | |
132 | | - | |
| 130 | + | |
133 | 131 | | |
134 | 132 | | |
135 | 133 | | |
| |||
0 commit comments