-
-
Notifications
You must be signed in to change notification settings - Fork 380
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?
RubyLLM::Message#to_h is shallow, not converting nested
How to reproduce
chat.ask(query)
chat.messages.map(&:to_h)
Expected behavior
When calling to_h on messages, the child records (like ToolCall) should also be converted to hashes
What actually happened
The message is a hash, but tool calls are still class records
Environment
Ruby 3.4.1
RubyLLM: 1.12.0
Provider: Bedrock
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working