-
-
Notifications
You must be signed in to change notification settings - Fork 189
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Basic checks
- I searched existing issues - this hasn't been reported
- I can reproduce this consistently
- This is a RubyLLM bug, not my application code
What's broken?
I created a super simple demo here: https://github.com/finbarr/multi-tool-demo
If the LLM returns multiple tool calls with a single message, RubyLLM tries to execute each sequentially but makes intermediate calls back to the LLM after each one, rather than running them all and then making a callback to the LLM. Somewhere along the way it breaks with
'RubyLLM::ErrorMiddleware.parse_error': messages: text content blocks must be non-empty (RubyLLM::BadRequestError)
How to reproduce
- clone https://github.com/finbarr/multi-tool-demo. It's a basic rails app with the 3 models needed by RubyLLM and the gem added with basic config.
- run ./script/demo.rb
- see the error
Expected behavior
- RubyLLM should call each tool, aggregate the results, then make a callback to the LLM with all of the tool results.
- It shouldn't break.
What actually happened
- RubyLLM calls the tools one at a time and tries to return the results individually to the LLM.
- It breaks.
Environment
- ruby 3.4.3
- rails 8.0.2
- ruby_llm 1.3.0
crmnetpaulshippy
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working