Skip to content

Commit 8be69b2

Browse files
committed
fix naming of tool call const
1 parent 526acf3 commit 8be69b2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

sentry_sdk/ai/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ class GEN_AI_ALLOWED_MESSAGE_ROLES:
1414
SYSTEM = "system"
1515
USER = "user"
1616
ASSISTANT = "assistant"
17-
TOOL_CALL = "tool"
17+
TOOL = "tool"
1818

1919

2020
GEN_AI_MESSAGE_ROLE_REVERSE_MAPPING = {
2121
GEN_AI_ALLOWED_MESSAGE_ROLES.SYSTEM: ["system"],
2222
GEN_AI_ALLOWED_MESSAGE_ROLES.USER: ["user", "human"],
2323
GEN_AI_ALLOWED_MESSAGE_ROLES.ASSISTANT: ["assistant", "ai"],
24-
GEN_AI_ALLOWED_MESSAGE_ROLES.TOOL_CALL: ["tool", "tool_call"],
24+
GEN_AI_ALLOWED_MESSAGE_ROLES.TOOL: ["tool", "tool_call"],
2525
}
2626

2727
GEN_AI_MESSAGE_ROLE_MAPPING = {}

sentry_sdk/integrations/openai_agents/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def _set_input_data(span, get_response_kwargs):
130130
elif message.get("type") == "function_call_output":
131131
request_messages.append(
132132
{
133-
"role": GEN_AI_ALLOWED_MESSAGE_ROLES.TOOL_CALL,
133+
"role": GEN_AI_ALLOWED_MESSAGE_ROLES.TOOL,
134134
"content": [message],
135135
}
136136
)

0 commit comments

Comments
 (0)