Commit 21c2b78
authored
[Bug] SequentialWorkflow.run accepts imgs and then drops it (#1822)
* [Bug] SequentialWorkflow.run accepts imgs and then drops it
run() takes an imgs parameter and documents it as "Optional list of
images for the agents", but only task and img ever make it into the
kwargs handed to AgentRearrange:
run_kwargs = {"task": task}
if img is not None:
run_kwargs["img"] = img
So a multi-image run silently degrades to a text-only run. No error,
no warning -- the agents just answer a question about images they were
never shown.
AgentRearrange forwards **kwargs down to Agent.run, which does accept
imgs, so passing it through is all that's needed.
* Annotate run_kwargs as Dict[str, Any] so Pyre accepts the imgs list
Pyre inferred Dict[str, str] from the task entry alone, so assigning the
imgs list tripped 'Incompatible parameter type [6]' in code scanning.1 parent fd9c2e0 commit 21c2b78
2 files changed
Lines changed: 33 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
329 | | - | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
330 | 332 | | |
331 | 333 | | |
| 334 | + | |
| 335 | + | |
332 | 336 | | |
333 | 337 | | |
334 | 338 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
612 | 612 | | |
613 | 613 | | |
614 | 614 | | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
0 commit comments