Skip to content
Open
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ def set_input(span, params)
input_messages = []

begin
if params[:system]
system_content = params[:system]
if params[:system_]
system_content = params[:system_]
if system_content.is_a?(Array)
system_text = system_content.map { |blk|
blk.is_a?(Hash) ? blk[:text] : blk
Expand Down
4 changes: 2 additions & 2 deletions lib/braintrust/contrib/anthropic/instrumentation/messages.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ def build_metadata(params, stream: false)
def set_input(span, params)
input_messages = []

if params[:system]
system_content = params[:system]
if params[:system_]
system_content = params[:system_]
if system_content.is_a?(Array)
system_text = system_content.map { |blk|
blk.is_a?(Hash) ? blk[:text] : blk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def test_handles_system_prompt
message = client.messages.create(
model: "claude-sonnet-4-20250514",
max_tokens: 20,
system: "You are a helpful assistant that always responds briefly.",
system_: "You are a helpful assistant that always responds briefly.",
messages: [
{role: "user", content: "Say hello"}
]
Expand Down