* Create dataset from request logs * Move drawer expansion logic out of app state * Add empty dataset page * Properly handle zero dataset state * Add DatasetEntriesTable * Open DatasetEntryEditorDrawer on row click * Add editable messages * Change Request Logs link to be a span * Add FunctionCallEditor * Change styling around * Stop logging variant stats after a while * Change FunctionCallEditor widths * Record input tokens even on errored calls * Allow user to add messages * Allow changing from empty text to function call * Fix some data layout issues * Default to empty output * Update arguments on blur * Add beta flag to datasets tab * Remove unused import * Save training and testing datasets on fine tune * Add DatasetEntryType * Condense migrations * Add index to datasetEntry * Add datasetEntry index * Fix types * Enable scrolling beyond last line in VariantEditor * Divide new dataset entries exactly along training/testing ratio
28 lines
1.2 KiB
SQL
28 lines
1.2 KiB
SQL
/*
|
|
Warnings:
|
|
|
|
- Added the required column `input` to the `DatasetEntry` table without a default value. This is not possible if the table is not empty.
|
|
- Added the required column `inputTokens` to the `DatasetEntry` table without a default value. This is not possible if the table is not empty.
|
|
- Added the required column `outputTokens` to the `DatasetEntry` table without a default value. This is not possible if the table is not empty.
|
|
- Added the required column `type` to the `DatasetEntry` table without a default value. This is not possible if the table is not empty.
|
|
|
|
*/
|
|
-- CreateEnum
|
|
CREATE TYPE "DatasetEntryType" AS ENUM ('TRAIN', 'TEST');
|
|
|
|
-- AlterTable
|
|
ALTER TABLE "Dataset" ADD COLUMN "trainingRatio" DOUBLE PRECISION NOT NULL DEFAULT 0.8;
|
|
|
|
-- AlterTable
|
|
ALTER TABLE "DatasetEntry" ADD COLUMN "input" JSONB NOT NULL,
|
|
ADD COLUMN "inputTokens" INTEGER NOT NULL,
|
|
ADD COLUMN "output" JSONB,
|
|
ADD COLUMN "outputTokens" INTEGER NOT NULL,
|
|
ADD COLUMN "type" "DatasetEntryType" NOT NULL;
|
|
|
|
-- CreateIndex
|
|
CREATE INDEX "DatasetEntry_datasetId_createdAt_id_idx" ON "DatasetEntry"("datasetId", "createdAt", "id");
|
|
|
|
-- CreateIndex
|
|
CREATE INDEX "DatasetEntry_datasetId_type_idx" ON "DatasetEntry"("datasetId", "type");
|