File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
tests/integrations/huggingface_hub Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -791,13 +791,15 @@ def test_chat_completion_streaming_with_tools(
791791 "gen_ai.response.finish_reasons" : "tool_calls" ,
792792 "gen_ai.response.model" : "test-model-123" ,
793793 "gen_ai.response.streaming" : True ,
794- "gen_ai.usage.input_tokens" : 183 ,
795- "gen_ai.usage.output_tokens" : 14 ,
796- "gen_ai.usage.total_tokens" : 197 ,
797794 "thread.id" : mock .ANY ,
798795 "thread.name" : mock .ANY ,
799796 }
800797
798+ if HF_VERSION and HF_VERSION >= (0 , 26 , 0 ):
799+ expected_data ["gen_ai.usage.input_tokens" ] = 183
800+ expected_data ["gen_ai.usage.output_tokens" ] = 14
801+ expected_data ["gen_ai.usage.total_tokens" ] = 197
802+
801803 if send_default_pii and include_prompts :
802804 expected_data ["gen_ai.request.messages" ] = (
803805 '[{"role": "user", "content": "What is the weather in Paris?"}]'
You can’t perform that action at this time.
0 commit comments