Skip to content

Commit b314161

Browse files
one more instance
1 parent 3a0a708 commit b314161

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

tests/integrations/openai_agents/test_openai_agents.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2723,12 +2723,11 @@ def simple_test_tool(message: str) -> str:
27232723
"status": None,
27242724
}
27252725

2726-
if OPENAI_VERSION >= (2, 25, 0):
2727-
tool_call["namespace"] = None
2728-
2729-
assert json.loads(ai_client_span1["data"]["gen_ai.response.tool_calls"]) == [
2730-
tool_call
2731-
]
2726+
parsed_tool_calls = json.loads(
2727+
ai_client_span1["attributes"]["gen_ai.response.tool_calls"]
2728+
)
2729+
assert len(parsed_tool_calls) == 1
2730+
assert tool_call.items() <= parsed_tool_calls[0].items()
27322731

27332732
assert tool_span["description"] == "execute_tool simple_test_tool"
27342733
assert tool_span["data"]["gen_ai.agent.name"] == "test_agent"

0 commit comments

Comments
 (0)