* fix ci
This commit is contained in:
parent
18050872fc
commit
68a5ca8928
1 changed files with 11 additions and 7 deletions
|
|
@ -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),
|
||||
),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue