mirror of
https://github.com/simstudioai/sim.git
synced 2026-02-02 18:55:25 -05:00
* fix(ratelimit): make deployed chat rate limited * improvement(rate-limiter): use token bucket algo * update docs * fix * fix type * fix db rate limiter * address greptile comments
8 lines
248 B
SQL
8 lines
248 B
SQL
CREATE TABLE "rate_limit_bucket" (
|
|
"key" text PRIMARY KEY NOT NULL,
|
|
"tokens" numeric NOT NULL,
|
|
"last_refill_at" timestamp NOT NULL,
|
|
"updated_at" timestamp DEFAULT now() NOT NULL
|
|
);
|
|
--> statement-breakpoint
|
|
DROP TABLE "user_rate_limits" CASCADE; |