@@ -251,13 +251,11 @@ def extract_attributes(self, attributes: _AttributeMapT):
251251 attributes [GEN_AI_SYSTEM ] = _AWS_BEDROCK_SYSTEM
252252
253253 model_id = self ._call_context .params .get (_MODEL_ID )
254- # attributes["Testing"]= "Test"
255254 if model_id :
256255 attributes [GEN_AI_REQUEST_MODEL ] = model_id
257256
258257 # Get the request body if it exists
259258 body = self ._call_context .params .get ("body" )
260- # print("This is the body :",body)
261259 if body :
262260 try :
263261 request_body = json .loads (body )
@@ -308,7 +306,6 @@ def _extract_llama_attributes(self, attributes, request_body):
308306 self ._set_if_not_none (attributes , GEN_AI_REQUEST_TOP_P , request_body .get ("top_p" ))
309307
310308 def _extract_mistral_attributes (self , attributes , request_body ):
311- print ("This is the request body:" , request_body )
312309 prompt = request_body .get ("prompt" )
313310 if prompt :
314311 attributes [GEN_AI_USAGE_INPUT_TOKENS ] = math .ceil (len (prompt ) / 6 )
@@ -322,8 +319,6 @@ def _set_if_not_none(attributes, key, value):
322319 attributes [key ] = value
323320
324321 def on_success (self , span : Span , result : Dict [str , Any ]):
325- super ().on_success (span , result )
326-
327322 model_id = self ._call_context .params .get (_MODEL_ID )
328323 if not model_id :
329324 return
@@ -404,7 +399,6 @@ def _handle_meta_llama_response(self, span: Span, response_body: Dict[str, Any])
404399 span .set_attribute (GEN_AI_RESPONSE_FINISH_REASONS , [response_body ["stop_reason" ]])
405400
406401 def _handle_mistral_mistral_response (self , span : Span , response_body : Dict [str , Any ]):
407- print ("This is the response body :" , response_body )
408402 if "outputs" in response_body :
409403 outputs = response_body ["outputs" ][0 ]
410404 if "text" in outputs :
0 commit comments