zen: tpm routing
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
CREATE TABLE `model_tpm_rate_limit` (
|
||||
`id` varchar(255) PRIMARY KEY,
|
||||
`interval` bigint NOT NULL,
|
||||
`count` int NOT NULL
|
||||
);
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
import { mysqlTable, int, primaryKey, varchar } from "drizzle-orm/mysql-core"
|
||||
import { mysqlTable, int, primaryKey, varchar, bigint } from "drizzle-orm/mysql-core"
|
||||
import { timestamps } from "../drizzle/types"
|
||||
|
||||
export const IpTable = mysqlTable(
|
||||
@@ -31,10 +31,11 @@ export const KeyRateLimitTable = mysqlTable(
|
||||
(table) => [primaryKey({ columns: [table.key, table.interval] })],
|
||||
)
|
||||
|
||||
export const ModelTpmLimitTable = mysqlTable(
|
||||
"model_tpm_limit",
|
||||
export const ModelTpmRateLimitTable = mysqlTable(
|
||||
"model_tpm_rate_limit",
|
||||
{
|
||||
id: varchar("id", { length: 255 }).notNull(),
|
||||
interval: bigint("interval", { mode: "number" }).notNull(),
|
||||
count: int("count").notNull(),
|
||||
},
|
||||
(table) => [primaryKey({ columns: [table.id] })],
|
||||
|
||||
Reference in New Issue
Block a user