File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
aws-distro-opentelemetry-node-autoinstrumentation/src/patches/aws/services Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -215,13 +215,15 @@ export class BedrockRuntimeServiceExtension implements ServiceExtension {
215215 const requestBody = JSON . parse ( request . commandInput . body ) ;
216216 if ( modelId . includes ( 'amazon.titan' ) ) {
217217 if ( requestBody . textGenerationConfig ?. temperature !== undefined ) {
218- spanAttributes [ AwsSpanProcessingUtil . GEN_AI_REQUEST_TEMPERATURE ] = requestBody . textGenerationConfig . temperature ;
218+ spanAttributes [ AwsSpanProcessingUtil . GEN_AI_REQUEST_TEMPERATURE ] =
219+ requestBody . textGenerationConfig . temperature ;
219220 }
220221 if ( requestBody . textGenerationConfig ?. topP !== undefined ) {
221222 spanAttributes [ AwsSpanProcessingUtil . GEN_AI_REQUEST_TOP_P ] = requestBody . textGenerationConfig . topP ;
222223 }
223- if ( requestBody . textGenerationConfig ?. maxTokenCount != undefined ) {
224- spanAttributes [ AwsSpanProcessingUtil . GEN_AI_REQUEST_MAX_TOKENS ] = requestBody . textGenerationConfig . maxTokenCount ;
224+ if ( requestBody . textGenerationConfig ?. maxTokenCount !== undefined ) {
225+ spanAttributes [ AwsSpanProcessingUtil . GEN_AI_REQUEST_MAX_TOKENS ] =
226+ requestBody . textGenerationConfig . maxTokenCount ;
225227 }
226228 } else if ( modelId . includes ( 'anthropic.claude' ) ) {
227229 if ( requestBody . max_tokens !== undefined ) {
You can’t perform that action at this time.
0 commit comments