Commit 482ab2a
fix(utils): guard against None fields in merge_embed_responses (#771)
When batching embed requests, later responses may have None for an
embedding field that the first response has set. The inner comprehension
now uses `(getattr(..., field) or [])` so None fields are treated as
empty rather than raising TypeError: 'NoneType' object is not iterable.
Fixes #770
Co-authored-by: Aegis Dev <devteamaegis@users.noreply.github.com>
Co-authored-by: fern-support <126544928+fern-support@users.noreply.github.com>1 parent 3b49748 commit 482ab2a
2 files changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
| 231 | + | |
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
192 | 202 | | |
193 | 203 | | |
194 | 204 | | |
| |||
0 commit comments