diff --git a/pkg/providers/bedrock/provider_bedrock.go b/pkg/providers/bedrock/provider_bedrock.go index ee0ac75a0..19dffdb40 100644 --- a/pkg/providers/bedrock/provider_bedrock.go +++ b/pkg/providers/bedrock/provider_bedrock.go @@ -137,10 +137,10 @@ func NewProvider(ctx context.Context, opts ...Option) (*Provider, error) { // converseParams holds the shared request parameters for Converse and ConverseStream. type converseParams struct { - messages []types.Message - system []types.SystemContentBlock + messages []types.Message + system []types.SystemContentBlock inferenceConfig *types.InferenceConfiguration - toolConfig *types.ToolConfiguration + toolConfig *types.ToolConfiguration } func buildConverseParams(messages []Message, tools []ToolDefinition, options map[string]any) converseParams { @@ -174,10 +174,10 @@ func buildConverseParams(messages []Message, tools []ToolDefinition, options map } return converseParams{ - messages: bedrockMessages, - system: systemPrompts, + messages: bedrockMessages, + system: systemPrompts, inferenceConfig: inferenceConfig, - toolConfig: toolConfig, + toolConfig: toolConfig, } } @@ -394,7 +394,11 @@ func parseStreamResponse( usage = &UsageInfo{ PromptTokens: int(aws.ToInt32(e.Value.Usage.InputTokens)), CompletionTokens: int(aws.ToInt32(e.Value.Usage.OutputTokens)), - TotalTokens: int(aws.ToInt32(e.Value.Usage.InputTokens)) + int(aws.ToInt32(e.Value.Usage.OutputTokens)), + TotalTokens: int( + aws.ToInt32(e.Value.Usage.InputTokens), + ) + int( + aws.ToInt32(e.Value.Usage.OutputTokens), + ), } } }