Fix seeds and update eval field names

This commit is contained in:
Kyle Corbitt
2023-07-17 14:14:20 -07:00
parent 6b84a59372
commit 54369dba54
18 changed files with 136 additions and 80 deletions

View File

@@ -14,11 +14,11 @@ export const evaluateOutput = (
const stringifiedMessage = message.content ?? JSON.stringify(message.function_call);
const matchRegex = fillTemplate(evaluation.matchString, scenario.variableValues as VariableMap);
const matchRegex = fillTemplate(evaluation.value, scenario.variableValues as VariableMap);
let match;
switch (evaluation.matchType) {
switch (evaluation.evalType) {
case "CONTAINS":
match = stringifiedMessage.match(matchRegex) !== null;
break;

View File

@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/no-unsafe-call */
import { isObject } from "lodash";
import { isObject } from "lodash-es";
import { Prisma } from "@prisma/client";
import { streamChatCompletion } from "./openai";
import { wsConnection } from "~/utils/wsConnection";

View File

@@ -1,4 +1,4 @@
import { omit } from "lodash";
import { omit } from "lodash-es";
import { env } from "~/env.mjs";
import OpenAI from "openai";

View File

@@ -1,4 +1,4 @@
import { isObject } from "lodash";
import { isObject } from "lodash-es";
import { type JSONSerializable } from "../types";
export const shouldStream = (config: JSONSerializable): boolean => {