Skip to content

Commit

Permalink
make DynamicRunEvaluatorParams generic (#5246)
Browse files Browse the repository at this point in the history
Co-authored-by: Brace Sproul <[email protected]>
  • Loading branch information
davidfant and bracesproul authored Apr 30, 2024
1 parent b46ee43 commit 52007ab
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions langchain/src/smith/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,14 @@ export type EvaluatorInputFormatter = ({
run: Run;
}) => EvaluatorInputs;

export type DynamicRunEvaluatorParams = {
input: Record<string, unknown>;
prediction?: Record<string, unknown>;
reference?: Record<string, unknown>;
export type DynamicRunEvaluatorParams<
Input extends Record<string, any> = Record<string, unknown>,
Prediction extends Record<string, any> = Record<string, unknown>,
Reference extends Record<string, any> = Record<string, unknown>
> = {
input: Input;
prediction?: Prediction;
reference?: Reference;
run: Run;
example?: Example;
};
Expand Down

0 comments on commit 52007ab

Please sign in to comment.