Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
patrykkopycinski committed Feb 25, 2025
1 parent 3f0758a commit 586ccef
Showing 1 changed file with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,17 @@ export const BedrockToolChoiceSchema = schema.object({
name: schema.maybe(schema.string()),
});

export const BedrockUsageSchema = schema.maybe(schema.object(
{
input_tokens: schema.number(),
output_tokens: schema.number(),
// added with Sonnet 3.7
cache_creation_input_tokens: schema.maybe(schema.number()),
},
{ unknowns: 'allow' }
));
export const BedrockUsageSchema = schema.maybe(
schema.object(
{
input_tokens: schema.number(),
output_tokens: schema.number(),
// added with Sonnet 3.7
cache_creation_input_tokens: schema.maybe(schema.number()),
},
{ unknowns: 'allow' }
)
);

export const InvokeAIActionParamsSchema = schema.object({
messages: schema.arrayOf(BedrockMessageSchema),
Expand Down Expand Up @@ -92,7 +94,7 @@ export const InvokeAIActionParamsSchema = schema.object({

export const InvokeAIActionResponseSchema = schema.object({
message: schema.string(),
usage: BedrockUsageSchema
usage: BedrockUsageSchema,
});

export const InvokeAIRawActionParamsSchema = schema.object({
Expand Down Expand Up @@ -145,7 +147,7 @@ export const RunActionResponseSchema = schema.object(
{
completion: schema.string(),
stop_reason: schema.maybe(schema.string()),
usage: BedrockUsageSchema
usage: BedrockUsageSchema,
},
{ unknowns: 'ignore' }
);
Expand Down

0 comments on commit 586ccef

Please sign in to comment.