Skip to content

Commit e034d25

Browse files
committed
fix: portkey plugin response handling
1 parent 8506249 commit e034d25

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

plugins/portkey/gibberish.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const handler: PluginHandler = async (
2929
text = textArray.filter((text) => text).join('\n');
3030
const not = parameters.not || false;
3131

32-
const response: any = await fetchPortkey(
32+
const { response }: any = await fetchPortkey(
3333
options?.env || {},
3434
PORTKEY_ENDPOINTS.GIBBERISH,
3535
parameters.credentials,

plugins/portkey/language.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const handler: PluginHandler = async (
3030
const languages = parameters.language;
3131
const not = parameters.not || false;
3232

33-
const result: any = await fetchPortkey(
33+
const { response: result }: any = await fetchPortkey(
3434
options?.env || {},
3535
PORTKEY_ENDPOINTS.LANGUAGE,
3636
parameters.credentials,

plugins/portkey/moderateContent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const handler: PluginHandler = async (
3030
const categories = parameters.categories;
3131
const not = parameters.not || false;
3232

33-
const result: any = await fetchPortkey(
33+
const { response: result }: any = await fetchPortkey(
3434
options?.env || {},
3535
PORTKEY_ENDPOINTS.MODERATIONS,
3636
parameters.credentials,

0 commit comments

Comments
 (0)