-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix pgvector example + upgrade (#918)
- Loading branch information
Showing
8 changed files
with
1,381 additions
and
1,142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,6 @@ | ||
import { clsx, type ClassValue } from 'clsx' | ||
import { twMerge } from 'tailwind-merge' | ||
import { Ratelimit } from '@upstash/ratelimit' | ||
import { kv } from '@vercel/kv' | ||
|
||
export function cn(...inputs: ClassValue[]) { | ||
return twMerge(clsx(inputs)) | ||
} | ||
|
||
// Create a new ratelimiter, that allows 10 requests per 10 seconds | ||
export const ratelimit = new Ratelimit({ | ||
redis: kv as any, | ||
limiter: Ratelimit.slidingWindow(10, '10 s'), | ||
analytics: true, | ||
/** | ||
* Optional prefix for the keys used in redis. This is useful if you want to share a redis | ||
* instance with other applications and want to avoid key collisions. The default prefix is | ||
* "@upstash/ratelimit" | ||
*/ | ||
prefix: '@upstash/ratelimit', | ||
}) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.