forked from ChatGPTNextWeb/NextChat
-
Notifications
You must be signed in to change notification settings - Fork 3
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
1 parent
3932c59
commit 10193f1
Showing
12 changed files
with
782 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Auto Rebase | ||
|
||
on: | ||
schedule: | ||
- cron: '0 * * * *' # This will run every hour | ||
push: | ||
branches: | ||
- main # Change this to the branch you want to watch for updates | ||
workflow_dispatch: # Allows manual triggering of the action | ||
|
||
permissions: | ||
id-token: write | ||
contents: write | ||
|
||
jobs: | ||
rebase: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # Fetch all history for all branches and tags | ||
|
||
- name: Add upstream remote | ||
run: git remote add upstream https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git | ||
|
||
- name: Fetch upstream changes | ||
run: git fetch upstream | ||
|
||
- name: Rebase branch | ||
run: | | ||
git config --global user.email [email protected] | ||
git config --global user.name tsai | ||
git checkout main | ||
git rebase upstream/main | ||
- name: Push changes | ||
run: git push origin main --force |
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 |
---|---|---|
|
@@ -80,7 +80,7 @@ For enterprise inquiries, please contact: **[email protected]** | |
- I18n: English, 简体中文, 繁体中文, 日本語, Français, Español, Italiano, Türkçe, Deutsch, Tiếng Việt, Русский, Čeština, 한국어, Indonesia | ||
|
||
<div align="center"> | ||
|
||
![主界面](./docs/images/cover.png) | ||
|
||
</div> | ||
|
@@ -103,7 +103,7 @@ For enterprise inquiries, please contact: **[email protected]** | |
- 🚀 v2.15.8 Now supports Realtime Chat [#5672](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/issues/5672) | ||
- 🚀 v2.15.4 The Application supports using Tauri fetch LLM API, MORE SECURITY! [#5379](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/issues/5379) | ||
- 🚀 v2.15.0 Now supports Plugins! Read this: [NextChat-Awesome-Plugins](https://github.com/ChatGPTNextWeb/NextChat-Awesome-Plugins) | ||
- 🚀 v2.14.0 Now supports Artifacts & SD | ||
- 🚀 v2.14.0 Now supports Artifacts & SD | ||
- 🚀 v2.10.1 support Google Gemini Pro model. | ||
- 🚀 v2.9.11 you can use azure endpoint now. | ||
- 🚀 v2.8 now we have a client that runs across all platforms! | ||
|
@@ -156,7 +156,7 @@ For enterprise inquiries, please contact: **[email protected]** | |
1. Get [OpenAI API Key](https://platform.openai.com/account/api-keys); | ||
2. Click | ||
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FYidadaa%2FChatGPT-Next-Web&env=OPENAI_API_KEY&env=CODE&project-name=chatgpt-next-web&repository-name=ChatGPT-Next-Web), remember that `CODE` is your page password; | ||
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fsiliconflow%2FChatGPT-Next-Web&env=NEXT_PUBLIC_SF_NEXT_CHAT_CLIENT_ID&env=SF_NEXT_CHAT_SECRET&project-name=chatgpt-next-web&repository-name=ChatGPT-Next-Web), remember that `CODE` is your page password; | ||
3. Enjoy :) | ||
|
||
## FAQ | ||
|
@@ -358,7 +358,7 @@ Change default model | |
### `WHITE_WEBDAV_ENDPOINTS` (optional) | ||
|
||
You can use this option if you want to increase the number of webdav service addresses you are allowed to access, as required by the format: | ||
- Each address must be a complete endpoint | ||
- Each address must be a complete endpoint | ||
> `https://xxxx/yyy` | ||
- Multiple addresses are connected by ', ' | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import { NextRequest, NextResponse } from "next/server"; | ||
import { redirect } from "next/navigation"; | ||
import { cookies } from "next/headers"; | ||
|
||
export async function handle( | ||
req: NextRequest, | ||
{ params }: { params: { path: string[] } }, | ||
) { | ||
console.log("[SF] params ", params); | ||
|
||
if (req.method === "OPTIONS") { | ||
return NextResponse.json({ body: "OK" }, { status: 200 }); | ||
} | ||
const url = new URL(req.url); | ||
const queryParams = new URLSearchParams(url.search); | ||
const code = queryParams.get("code"); | ||
let sfak = ""; | ||
console.log("[SF] code ", code); | ||
try { | ||
const tokenFetch = await fetch( | ||
`${ | ||
process.env.NEXT_PUBLIC_SF_NEXT_CHAT_SF_ACCOUNT_ENDPOINT || | ||
"https://account.siliconflow.cn" | ||
}/api/open/oauth`, | ||
{ | ||
method: "POST", | ||
body: JSON.stringify({ | ||
clientId: process.env.NEXT_PUBLIC_SF_NEXT_CHAT_CLIENT_ID, | ||
secret: process.env.SF_NEXT_CHAT_SECRET, | ||
code, | ||
}), | ||
}, | ||
); | ||
if (!tokenFetch.ok) | ||
return Response.json( | ||
{ status: false, message: "fetch error" }, | ||
{ status: 500 }, | ||
); | ||
const tokenJson = await tokenFetch.json(); | ||
const access_token = tokenJson.status ? tokenJson.data?.access_token : null; | ||
console.log("access_token", access_token); | ||
const apiKey = await fetch( | ||
`${ | ||
process.env.NEXT_PUBLIC_SF_NEXT_CHAT_SF_CLOUD_ENDPOINT || | ||
"https://cloud.siliconflow.cn" | ||
}/api/oauth/apikeys`, | ||
{ | ||
method: "POST", | ||
headers: { | ||
Authorization: `token ${access_token}`, | ||
}, | ||
}, | ||
); | ||
const apiKeysData = await apiKey.json(); | ||
console.log("apiKeysData", apiKeysData); | ||
sfak = apiKeysData.data[0].secretKey; | ||
} catch (error) { | ||
console.log("error", error); | ||
return Response.json( | ||
{ status: false, message: "fetch error" }, | ||
{ status: 500 }, | ||
); | ||
} | ||
cookies().set("sfak", sfak); | ||
redirect(`/`); | ||
} |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.