Add promptTokens and completionTokens to model output (#11)
* Default to streaming in config * Add tokens to database * Add NEXT_PUBLIC_SOCKET_URL to .env.example * Disable streaming for functions * Add newline to types
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "ModelOutput" ADD COLUMN "completionTokens" INTEGER,
|
||||
ADD COLUMN "promptTokens" INTEGER;
|
||||
@@ -82,6 +82,9 @@ model ModelOutput {
|
||||
errorMessage String?
|
||||
timeToComplete Int @default(0)
|
||||
|
||||
promptTokens Int? // Added promptTokens field
|
||||
completionTokens Int? // Added completionTokens field
|
||||
|
||||
promptVariantId String @db.Uuid
|
||||
promptVariant PromptVariant @relation(fields: [promptVariantId], references: [id], onDelete: Cascade)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user