Skip to content

Commit c33ef01

Browse files
authored
Merge pull request #863 from Portkey-AI/fix/promptfoo-test-build-errors
Fix: promptfoo test cases build errors
2 parents f2acf86 + b150283 commit c33ef01

File tree

4 files changed

+5
-8
lines changed

4 files changed

+5
-8
lines changed

plugins/promptfoo/guard.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ import { GuardResult, PromptfooResult } from './types';
1111
export const handler: PluginHandler = async (
1212
context: PluginContext,
1313
parameters: PluginParameters,
14-
eventType: HookEventType,
15-
options: { env: Record<string, any> }
14+
eventType: HookEventType
1615
) => {
1716
let error = null;
1817
let verdict = true;

plugins/promptfoo/harm.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ import { HarmResult, PromptfooResult } from './types';
1111
export const handler: PluginHandler = async (
1212
context: PluginContext,
1313
parameters: PluginParameters,
14-
eventType: HookEventType,
15-
options: { env: Record<string, any> }
14+
eventType: HookEventType
1615
) => {
1716
let error = null;
1817
let verdict = true;

plugins/promptfoo/pii.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ import { PIIResult, PromptfooResult } from './types';
1111
export const handler: PluginHandler = async (
1212
context: PluginContext,
1313
parameters: PluginParameters,
14-
eventType: HookEventType,
15-
options: { env: Record<string, any> }
14+
eventType: HookEventType
1615
) => {
1716
let error = null;
1817
let verdict = true;

plugins/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export interface PluginContext {
22
[key: string]: any;
3-
requestType: 'complete' | 'chatComplete';
4-
provider: string;
3+
requestType?: 'complete' | 'chatComplete';
4+
provider?: string;
55
}
66

77
export interface PluginParameters {

0 commit comments

Comments
 (0)