Skip to content

[BUG] chat.ask(query).tool_calls empty #609

@KieranP

Description

@KieranP

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?

We use Mongoid, so can't use built in ActiveRecord support for storing chats.

Part of this, I need to store the final response. But tool calls aren't included (response.tool_calls is empty hash even tough I know it is making tool calls to the DB because it can return the info it should).

Am I missing something? Shouldn't the response returned by ask include all tools made during the execution of ask?

How to reproduce

Basic setup with a tool:

response = chat.ask(query)
puts response.tool_calls.inspect

Expected behavior

Response from chat.ask should include all tool calls made

What actually happened

Tool calls is empty

Environment

Ruby 3.4.1
RubyLLM: 1.12.0
Provider: Bedrock

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions