Skip to content

Commit

Permalink
chore: fallback to default plugin if provider name is not passed
Browse files Browse the repository at this point in the history
  • Loading branch information
VisargD committed Dec 27, 2024
1 parent 98ffb08 commit 7210eea
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/handlers/handlerUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,11 @@ export function convertGuardrailsShorthand(guardrailsArr: any, type: string) {
}
});

hooksObject = convertKeysToCamelCase(hooksObject);

// Now, add all the checks to the checks array
hooksObject.checks = Object.keys(guardrails).map((key) => ({
id: key,
id: key.includes('.') ? key : `default.${key}`,
parameters: guardrails[key],
}));

Expand Down Expand Up @@ -991,6 +993,8 @@ export function constructConfigFromRequestHeaders(
'checks',
'vertex_service_account_json',
'conditions',
'input_guardrails',
'output_guardrails',
]) as any;
}

Expand Down

0 comments on commit 7210eea

Please sign in to comment.