File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
tests/integrations/langchain Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -353,13 +353,8 @@ def test_tool_execution_span(
353353 "Tool calls should be recorded when send_default_pii=True and include_prompts=True"
354354 )
355355 tool_calls_data = chat_spans [0 ]["data" ][SPANDATA .GEN_AI_RESPONSE_TOOL_CALLS ]
356- assert isinstance (tool_calls_data , (list , str )) # Could be serialized
357- if isinstance (tool_calls_data , str ):
358- assert "get_word_length" in tool_calls_data
359- elif isinstance (tool_calls_data , list ) and len (tool_calls_data ) > 0 :
360- # Check if tool calls contain expected function name
361- tool_call_str = str (tool_calls_data )
362- assert "get_word_length" in tool_call_str
356+ assert isinstance (tool_calls_data , str )
357+ assert "get_word_length" in tool_calls_data
363358 else :
364359 assert SPANDATA .GEN_AI_REQUEST_MESSAGES not in chat_spans [0 ].get ("data" , {})
365360 assert SPANDATA .GEN_AI_RESPONSE_TEXT not in chat_spans [0 ].get ("data" , {})
You can’t perform that action at this time.
0 commit comments