Commit 776d277
committed
chore(examples): PR-review fixes for 05/07/09
- 09 tool-use: handle ``ToolCall.arguments is None`` (provider-
reported parse error path) and wrap dispatch in a try/except that
catches KeyError/ValueError/TypeError from bad args. Errors surface
as ToolMessage content so the model can retry or give up gracefully
rather than crashing the graph.
- 07 multimodal-prompt: add ``prompts_fallback/production/
identify-mission.j2`` so the fallback backend actually covers both
prompts. Without it, a primary outage would let the caption call
fall through but break the identify call with PromptNotFound.
Update the in-code comment that previously said fallback shipped
only one prompt.
- 05 fan-out-with-retry: fix BatchState docstring that referenced
``branch_errors`` (the parallel-branches-side name) — the actual
field is ``instance_errors``.1 parent 89f13b1 commit 776d277
4 files changed
Lines changed: 36 additions & 7 deletions
File tree
- examples
- 05-fan-out-with-retry
- 07-multimodal-prompt
- prompts_fallback/production
- 09-tool-use
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
| |||
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
292 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
293 | 306 | | |
294 | 307 | | |
295 | 308 | | |
| |||
0 commit comments