Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeldking committed Jan 11, 2024
1 parent 8b56042 commit 0a41e06
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,13 @@ function getLLMInputMessagesAttributes(
acc[`${index_prefix}.${SemanticConventions.MESSAGE_ROLE}`] = String(
message.role,
);
if (message.role == "tool") {
acc[`${index_prefix}.${SemanticConventions.TOOL_CALL_FUNCTION_NAME}`] =
message.tool_call_id;
} else if (message.role === "function") {
acc[`${index_prefix}.${SemanticConventions.MESSAGE_FUNCTION_CALL_NAME}`] =
message.name;
}
return acc;
}, {} as Attributes);
}
Expand Down

0 comments on commit 0a41e06

Please sign in to comment.