Add scenario editing modal, twitter sentiment seeding (#101)
* testing agi-eval benchmark * Add scenario modal editor * Add initial values to ScenarioEditorModal * Add seedTwitterSentiment.ts --------- Co-authored-by: Kyle Corbitt <kyle@corbt.com>
This commit is contained in:
@@ -41,7 +41,21 @@ export const scenariosRouter = createTRPCRouter({
|
||||
count,
|
||||
};
|
||||
}),
|
||||
get: protectedProcedure.input(z.object({ id: z.string() })).query(async ({ input, ctx }) => {
|
||||
const scenario = await prisma.testScenario.findUnique({
|
||||
where: {
|
||||
id: input.id,
|
||||
},
|
||||
});
|
||||
|
||||
if (!scenario) {
|
||||
throw new Error(`Scenario with id ${input.id} does not exist`);
|
||||
}
|
||||
|
||||
await requireCanViewExperiment(scenario.experimentId, ctx);
|
||||
|
||||
return scenario;
|
||||
}),
|
||||
create: protectedProcedure
|
||||
.input(
|
||||
z.object({
|
||||
|
||||
Reference in New Issue
Block a user