rig icon indicating copy to clipboard operation
rig copied to clipboard

bug: Multiple tool calls in one completion response are not handled

Open vacekj opened this issue 1 year ago • 3 comments

  • [x] I have looked for existing issues (including closed) about this

Bug Report

Instead of handling all of the tool calls, the current agent impl only handles the first one.

Reproduction

Call a model that returns multiple tool calls, for example the calculator agent with multiple subs and adds

Expected behavior

Rig correctly evaluates all of the tool calls.

Actual behaviour

Rig only evaluates the first tool call.

Fix PR incoming!

vacekj avatar Jan 01 '25 14:01 vacekj

Check out #168 as a potential fix that was deployed specifically for Anthropic!

0xMochan avatar Jan 02 '25 15:01 0xMochan

Check out #168 as a potential fix that was deployed specifically for Anthropic!

This won't handle that issue, as for the moment the ModelChoice is a single object and not an array. You would need to parse the raw_response to gather all the tool_uses

edisontim avatar Jan 17 '25 21:01 edisontim

@0xMochan @edisontim here's how I implemented a fix: https://github.com/0xPlaygrounds/rig/pull/224

vacekj avatar Jan 20 '25 22:01 vacekj

Closing as I believe this has been fixed - please reply if you're still getting this issue!

joshua-mo-143 avatar Jul 04 '25 18:07 joshua-mo-143