@@ -1000,34 +1000,34 @@ def _get_input_attributes(template, send_pii, args, kwargs):
10001000 for key , value in list (kwargs .items ()):
10011001 if key == "model" and isinstance (value , str ):
10021002 attributes [SPANDATA .GEN_AI_REQUEST_MODEL ] = value
1003- elif key == "model_name" and isinstance (value , str ):
1003+ if key == "model_name" and isinstance (value , str ):
10041004 attributes [SPANDATA .GEN_AI_REQUEST_MODEL ] = value
10051005
1006- elif key == "agent" and isinstance (value , str ):
1006+ if key == "agent" and isinstance (value , str ):
10071007 attributes [SPANDATA .GEN_AI_AGENT_NAME ] = value
1008- elif key == "agent_name" and isinstance (value , str ):
1008+ if key == "agent_name" and isinstance (value , str ):
10091009 attributes [SPANDATA .GEN_AI_AGENT_NAME ] = value
10101010
1011- elif key == "prompt" and isinstance (value , str ):
1011+ if key == "prompt" and isinstance (value , str ):
10121012 attributes .setdefault (SPANDATA .GEN_AI_REQUEST_MESSAGES , []).append (
10131013 {"role" : "user" , "content" : value }
10141014 )
1015- elif key == "system_prompt" and isinstance (value , str ):
1015+ if key == "system_prompt" and isinstance (value , str ):
10161016 attributes .setdefault (SPANDATA .GEN_AI_REQUEST_MESSAGES , []).append (
10171017 {"role" : "system" , "content" : value }
10181018 )
10191019
1020- elif key == "max_tokens" and isinstance (value , int ):
1020+ if key == "max_tokens" and isinstance (value , int ):
10211021 attributes [SPANDATA .GEN_AI_REQUEST_MAX_TOKENS ] = value
1022- elif key == "frequency_penalty" and isinstance (value , float ):
1022+ if key == "frequency_penalty" and isinstance (value , float ):
10231023 attributes [SPANDATA .GEN_AI_REQUEST_FREQUENCY_PENALTY ] = value
1024- elif key == "presence_penalty" and isinstance (value , float ):
1024+ if key == "presence_penalty" and isinstance (value , float ):
10251025 attributes [SPANDATA .GEN_AI_REQUEST_PRESENCE_PENALTY ] = value
1026- elif key == "temperature" and isinstance (value , float ):
1026+ if key == "temperature" and isinstance (value , float ):
10271027 attributes [SPANDATA .GEN_AI_REQUEST_TEMPERATURE ] = value
1028- elif key == "top_p" and isinstance (value , float ):
1028+ if key == "top_p" and isinstance (value , float ):
10291029 attributes [SPANDATA .GEN_AI_REQUEST_TOP_P ] = value
1030- elif key == "top_k" and isinstance (value , int ):
1030+ if key == "top_k" and isinstance (value , int ):
10311031 attributes [SPANDATA .GEN_AI_REQUEST_TOP_K ] = value
10321032
10331033 if SPANDATA .GEN_AI_REQUEST_MESSAGES in attributes :
0 commit comments