more schema work
This commit is contained in:
@@ -41,7 +41,8 @@ Prompt Bench currently supports GPT-3.5 and GPT-4. Wider model support is planne
|
||||
We'll have a hosted version of Prompt Bench soon to make onboarding easier but for now you can run it locally.
|
||||
|
||||
1. Install [NodeJS 20](https://nodejs.org/en/download/current) (earlier versions will likely work but aren't tested)
|
||||
2. Clone this repository: `git clone https://github.com/prompt-bench/prompt-bench`
|
||||
3. Install the dependencies: `cd prompt-bench && npm install`
|
||||
4. Start the app: `npm start`
|
||||
5. Navigate to [http://localhost:3080](http://localhost:3080)
|
||||
2. Install `pnpm`: `npm i -g pnpm`
|
||||
3. Clone this repository: `git clone https://github.com/prompt-lab/prompt-lab`
|
||||
4. Install the dependencies: `cd prompt-lab && pnpm install`
|
||||
5. Start the app: `pnpm start`
|
||||
6. Navigate to [http://localhost:3000](http://localhost:3000)
|
||||
4290
package-lock.json
generated
4290
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "prompt-bench",
|
||||
"name": "prompt-lab",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"license": "AGPL",
|
||||
"scripts": {
|
||||
"build": "next build",
|
||||
"dev": "next dev",
|
||||
|
||||
2653
pnpm-lock.yaml
generated
Normal file
2653
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -2,21 +2,94 @@
|
||||
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
||||
|
||||
generator client {
|
||||
provider = "prisma-client-js"
|
||||
provider = "prisma-client-js"
|
||||
previewFeatures = ["jsonProtocol"]
|
||||
}
|
||||
|
||||
datasource db {
|
||||
provider = "sqlite"
|
||||
// NOTE: When using mysql or sqlserver, uncomment the @db.Text annotations in model Account below
|
||||
// Further reading:
|
||||
// https://next-auth.js.org/adapters/prisma#create-the-prisma-schema
|
||||
// https://www.prisma.io/docs/reference/api-reference/prisma-schema-reference#string
|
||||
provider = "postgresql"
|
||||
url = env("DATABASE_URL")
|
||||
}
|
||||
|
||||
model Example {
|
||||
id String @id @default(cuid())
|
||||
model Experiment {
|
||||
id String @id @default(uuid()) @db.Uuid
|
||||
label String
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
InputVariable InputVariable[]
|
||||
PromptVariant PromptVariant[]
|
||||
}
|
||||
|
||||
model PromptVariant {
|
||||
id String @id @default(uuid()) @db.Uuid
|
||||
|
||||
experimentId String @db.Uuid
|
||||
experiment Experiment @relation(fields: [experimentId], references: [id])
|
||||
|
||||
sortIndex Int @default(0)
|
||||
label String
|
||||
|
||||
config Json
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
ModelOutput ModelOutput[]
|
||||
}
|
||||
|
||||
model TestScenario {
|
||||
id String @id @default(uuid()) @db.Uuid
|
||||
|
||||
sortIndex Int @default(0)
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
ScenarioVariableVal ScenarioVariableVal[]
|
||||
ModelOutput ModelOutput[]
|
||||
}
|
||||
|
||||
model InputVariable {
|
||||
id String @id @default(uuid()) @db.Uuid
|
||||
|
||||
label String
|
||||
|
||||
experimentId String @db.Uuid
|
||||
experiment Experiment @relation(fields: [experimentId], references: [id])
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
ScenarioVariableVal ScenarioVariableVal[]
|
||||
}
|
||||
|
||||
model ScenarioVariableVal {
|
||||
id String @id @default(uuid()) @db.Uuid
|
||||
|
||||
inputVariableId String @db.Uuid
|
||||
inputVariable InputVariable? @relation(fields: [inputVariableId], references: [id])
|
||||
|
||||
testScenarioId String @db.Uuid
|
||||
testScenario TestScenario? @relation(fields: [testScenarioId], references: [id])
|
||||
|
||||
value String
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
@@unique([inputVariableId, testScenarioId])
|
||||
}
|
||||
|
||||
model ModelOutput {
|
||||
id String @id @default(uuid()) @db.Uuid
|
||||
|
||||
promptVariantId String @db.Uuid
|
||||
promptVariant PromptVariant @relation(fields: [promptVariantId], references: [id])
|
||||
|
||||
testScenarioId String @db.Uuid
|
||||
testScenario TestScenario @relation(fields: [testScenarioId], references: [id])
|
||||
|
||||
variableValues Json
|
||||
inputsHash String @unique
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user