Skip to content

Commit

Permalink
Evaluations PromptL version (#638)
Browse files Browse the repository at this point in the history
  • Loading branch information
csansoon authored Nov 19, 2024
1 parent 7c69907 commit 27044f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { bigint, bigserial, index, text } from 'drizzle-orm/pg-core'
import { bigint, bigserial, index, integer, text } from 'drizzle-orm/pg-core'

import { latitudeSchema } from '../db-schema'
import { timestamps } from '../schemaHelpers'
Expand All @@ -9,6 +9,7 @@ export const evaluationMetadataLlmAsJudgeAdvanced = latitudeSchema.table(
{
id: bigserial('id', { mode: 'number' }).notNull().primaryKey(),
prompt: text('prompt').notNull(),
promptlVersion: integer('promptl_version').notNull().default(0),
templateId: bigint('template_id', { mode: 'number' }).references(
() => evaluationAdvancedTemplates.id,
),
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/services/evaluations/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ export async function createAdvancedEvaluation<
prompt: metadata.prompt,
configuration: resultConfiguration,
templateId: metadata.templateId ?? null,
promptlVersion: 0, // TODO: Will be set to 1 by default on future PR
} as Omit<EvaluationMetadataLlmAsJudgeAdvanced, 'id'>,
resultType,
resultConfiguration,
Expand Down

0 comments on commit 27044f5

Please sign in to comment.