Skip to content

Commit

Permalink
Merge branch 'main' into hassieb/lfe-1408
Browse files Browse the repository at this point in the history
  • Loading branch information
maxdeichmann committed Jun 18, 2024
2 parents 52d7411 + f147d2b commit 09be38d
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions worker/src/__tests__/eval-service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,25 @@ describe("create eval jobs", () => {
})
.execute();

const templateId = randomUUID();
await kyselyPrisma.$kysely
.insertInto("eval_templates")
.values({
id: templateId,
project_id: "7a88fb47-b4e2-43b8-a06c-a5ce950dc53a",
name: "test-template",
version: 1,
prompt: "Please evaluate toxicity {{input}} {{output}}",
model: "gpt-3.5-turbo",
provider: "openai",
model_params: {},
output_schema: {
reasoning: "Please explain your reasoning",
score: "Please provide a score between 0 and 1",
},
})
.executeTakeFirst();

await prisma.jobConfiguration.create({
data: {
id: randomUUID(),
Expand All @@ -216,6 +235,7 @@ describe("create eval jobs", () => {
targetObject: "traces",
scoreName: "score",
variableMapping: JSON.parse("[]"),
evalTemplateId: templateId,
},
});

Expand Down

0 comments on commit 09be38d

Please sign in to comment.