Commit 7237384
committed
fix: convert list/tuple to iterator before calling next() on tool_calls_validator
The current implementation assigns raw_tool_calls directly to
tool_calls_validator. If raw_tool_calls is a list or tuple (which are
iterable but not iterators), calling next() will raise a TypeError.
Explicitly convert lists/tuples using iter() to ensure
tool_calls_validator is always an actual iterator before next() is called.
Signed-off-by: Elizabeth Thomas <email2eliza@gmail.com>1 parent 0103fb8 commit 7237384
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
78 | 81 | | |
79 | 82 | | |
80 | 83 | | |
| |||
0 commit comments