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.
|
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)
|
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`
|
2. Install `pnpm`: `npm i -g pnpm`
|
||||||
3. Install the dependencies: `cd prompt-bench && npm install`
|
3. Clone this repository: `git clone https://github.com/prompt-lab/prompt-lab`
|
||||||
4. Start the app: `npm start`
|
4. Install the dependencies: `cd prompt-lab && pnpm install`
|
||||||
5. Navigate to [http://localhost:3080](http://localhost:3080)
|
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",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"license": "AGPL",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
"dev": "next dev",
|
"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
|
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
||||||
|
|
||||||
generator client {
|
generator client {
|
||||||
provider = "prisma-client-js"
|
provider = "prisma-client-js"
|
||||||
previewFeatures = ["jsonProtocol"]
|
previewFeatures = ["jsonProtocol"]
|
||||||
}
|
}
|
||||||
|
|
||||||
datasource db {
|
datasource db {
|
||||||
provider = "sqlite"
|
provider = "postgresql"
|
||||||
// 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
|
|
||||||
url = env("DATABASE_URL")
|
url = env("DATABASE_URL")
|
||||||
}
|
}
|
||||||
|
|
||||||
model Example {
|
model Experiment {
|
||||||
id String @id @default(cuid())
|
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())
|
createdAt DateTime @default(now())
|
||||||
updatedAt DateTime @updatedAt
|
updatedAt DateTime @updatedAt
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user