Update tokenlens to canary with server side fetching (#1196)
Co-authored-by: josh <josh@afterima.ge>
This commit is contained in:
parent
445d63e620
commit
5ab695262f
10 changed files with 196 additions and 286 deletions
|
|
@ -11,7 +11,7 @@ import {
|
|||
foreignKey,
|
||||
boolean,
|
||||
} from 'drizzle-orm/pg-core';
|
||||
import type { LanguageModelV2Usage } from '@ai-sdk/provider';
|
||||
import type { AppUsage } from '../usage';
|
||||
|
||||
export const user = pgTable('User', {
|
||||
id: uuid('id').primaryKey().notNull().defaultRandom(),
|
||||
|
|
@ -31,7 +31,7 @@ export const chat = pgTable('Chat', {
|
|||
visibility: varchar('visibility', { enum: ['public', 'private'] })
|
||||
.notNull()
|
||||
.default('private'),
|
||||
lastContext: jsonb('lastContext').$type<LanguageModelV2Usage | null>(),
|
||||
lastContext: jsonb('lastContext').$type<AppUsage | null>(),
|
||||
});
|
||||
|
||||
export type Chat = InferSelectModel<typeof chat>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue