Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/braintrust/contrib/ruby_llm/instrumentation/chat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,8 @@ def format_attachment_for_input(attachment)

# Format tool calls into OpenAI format
def format_tool_calls(tool_calls)
tool_calls.map do |_id, tc|
# Both the pre-2.2 Hash and ToolCall::Collection expose values.
tool_calls.values.map do |tc|
args = tc.arguments
args_string = args.is_a?(String) ? args : JSON.generate(args)

Expand Down
Loading