Skip to content

Commit f018877

Browse files
authored
Merge branch 'main' into feature/add-qualifire-integration
2 parents 005a323 + a4fc4b4 commit f018877

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/handlers/chatCompletionsHandler.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ export async function chatCompletionsHandler(c: Context): Promise<Response> {
3030

3131
return tryTargetsResponse;
3232
} catch (err: any) {
33-
console.error('chatCompletionsHandler error: ', err);
33+
console.error(
34+
`chatCompletionsHandler error: ${err.message} \n\n stackTrace: ${err.stack}`
35+
);
3436
let statusCode = 500;
3537
let errorMessage = 'Something went wrong';
3638

src/handlers/handlerUtils.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ export function convertHooksShorthand(
260260

261261
// Now, add all the checks to the checks array
262262
hooksObject.checks = Object.keys(hook).map((key) => {
263-
const id = hook[key].id;
263+
const id = hook[key].id ?? key;
264264
return {
265265
id: id.includes('.') ? id : `default.${id}`,
266266
parameters: hook[key],
@@ -1096,6 +1096,8 @@ export function constructConfigFromRequestHeaders(
10961096
'default_input_guardrails',
10971097
'default_output_guardrails',
10981098
'integrationModelDetails',
1099+
'integrationDetails',
1100+
'virtualKeyDetails',
10991101
'cb_config',
11001102
]) as any;
11011103
}

0 commit comments

Comments
 (0)