This repository was archived by the owner on Feb 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 531
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
471 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
node_modules/ | ||
.next/ |
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,2 +1,9 @@ | ||
|
||
# palm-proxy | ||
Palm API proxy on Vercel Edge | ||
Google PaLM API proxy on Vercel Edge | ||
|
||
## Deploy | ||
|
||
### Deploy With Vercel | ||
|
||
[](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fantergone%2Fpalm-proxy) |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/image-types/global" /> | ||
|
||
// NOTE: This file should not be edited | ||
// see https://nextjs.org/docs/basic-features/typescript for more information. |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const config = { | ||
async rewrites() { | ||
return [ | ||
{ | ||
source: "/:path*", | ||
"has": [ | ||
{ | ||
"type": "query", | ||
"key": "key", | ||
} | ||
], | ||
destination: "/api/proxy" | ||
}, | ||
]; | ||
}, | ||
}; | ||
|
||
export default config; |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "palm-proxy", | ||
"version": "0.0.0", | ||
"devDependencies": { | ||
"@types/node": "latest", | ||
"@types/react": "latest", | ||
"typescript": "^5.3.3" | ||
}, | ||
"private": true, | ||
"scripts": { | ||
"next": "next", | ||
"build": "next build" | ||
}, | ||
"dependencies": { | ||
"next": "canary", | ||
"react": "latest", | ||
"react-dom": "latest" | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import handleRequest from "../../src/handle-request"; | ||
|
||
export const config = { | ||
runtime: "edge", | ||
// Available languages and regions for Google AI Studio and Gemini API | ||
// https://ai.google.dev/available_regions | ||
// https://vercel.com/docs/concepts/edge-network/regions | ||
regions: [ | ||
"cle1", | ||
"iad1", | ||
"pdx1", | ||
"sfo1", | ||
"sin1", | ||
"syd1", | ||
"hnd1", | ||
"kix1", | ||
], | ||
}; | ||
|
||
export default handleRequest; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.