Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ddd #5401

Closed
wants to merge 121 commits into from
Closed

ddd #5401

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
e92c087
Use AI assistant
Jun 7, 2023
2c7a483
change title
Jun 7, 2023
03a80e0
add debug info
Jun 8, 2023
4d396cf
add debug info
Jun 8, 2023
5813987
add self-learning prompt
Jun 10, 2023
54ece83
add mask
Jun 10, 2023
a66af46
update self study
Jun 11, 2023
e06d411
update self study
Jun 11, 2023
c70a59a
Merge pull request #1 from Yidadaa/main
aizpy Jun 13, 2023
2ae7582
add translator mask
aizpy Jun 13, 2023
754e1ab
update icon
aizpy Jun 13, 2023
1a28441
update icon
aizpy Jun 13, 2023
87f19de
update icon
aizpy Jun 13, 2023
8e981b4
update icon
aizpy Jun 13, 2023
c8757cd
update icon
aizpy Jun 13, 2023
3b6207e
update icon
aizpy Jun 13, 2023
c2cb195
update icon
aizpy Jun 13, 2023
3c9a5b4
Update web title
Jun 13, 2023
e978388
Update slogan
Jun 13, 2023
c719f0c
change chatgpt.svg
Jun 13, 2023
08a066c
change chatgpt.svg
Jun 13, 2023
fab3e88
update icon
Jun 13, 2023
6fad5bf
update icon
Jun 13, 2023
6da9671
update icon
Jun 13, 2023
d32b1d6
update icon
Jun 13, 2023
29026da
Merge pull request #2 from Yidadaa/main
aizpy Jun 14, 2023
563ab3c
update icon
Jun 14, 2023
3c7c375
Merge branch 'main' of github.com:aizpy/ChatGPT-Next-Web
Jun 14, 2023
56e732a
update icon
Jun 14, 2023
cf1a0c2
update icon
aizpy Jun 15, 2023
79ae25e
update icon
aizpy Jun 15, 2023
a403334
update icon
aizpy Jun 15, 2023
68938b8
update icon
aizpy Jun 15, 2023
bb00d57
update icon
aizpy Jun 15, 2023
4713429
update icon
aizpy Jun 15, 2023
3ea1f8e
update icon
aizpy Jun 15, 2023
e573374
update icon
aizpy Jun 15, 2023
fa268cb
update icon
aizpy Jun 15, 2023
5b8d303
upadte shareGPT title
aizpy Jun 15, 2023
7aae655
Merge branch 'Yidadaa:main' into main
aizpy Jun 15, 2023
cde2ad3
upadte locales
aizpy Jun 15, 2023
549b419
update icon
Jun 15, 2023
dcff09f
update icon
Jun 15, 2023
e439d61
update icon
Jun 15, 2023
3c86e30
update default identity
Jun 15, 2023
423b070
update default identity
Jun 15, 2023
c7f1f11
update default identity
Jun 15, 2023
a10dafc
Merge Conflict
aizpy Jun 16, 2023
4756dec
Merge branch 'Yidadaa-main'
aizpy Jun 16, 2023
a34f946
Update personal characteristic of Aizpy
aizpy Jun 16, 2023
168dacd
Update personal characteristic of Aizpy
aizpy Jun 16, 2023
573a0f4
Update
aizpy Jun 16, 2023
8ef24e6
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web
actions-user Jun 17, 2023
7a41425
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web
actions-user Jun 18, 2023
ead0f48
Merge branch 'Yidadaa:main' into main
aizpy Jun 19, 2023
8e32b45
mask add frequency_penalty support
aizpy Jun 19, 2023
380b072
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web
actions-user Jun 20, 2023
d250b15
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web
actions-user Jun 21, 2023
fef23e8
Merge branch 'Yidadaa:main' into main
aizpy Jun 21, 2023
4fbc4eb
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web
actions-user Jun 23, 2023
02d0c52
mask modify translation
aizpy Jun 25, 2023
5e23fd2
Merge branch 'main' of github.com:aizpy/ChatGPT-Next-Web
aizpy Jun 25, 2023
e698b21
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web in…
aizpy Jun 25, 2023
5925ec7
Merge branch 'Yidadaa-main'
aizpy Jun 25, 2023
9ae77fd
add default system prompt
aizpy Jun 25, 2023
c160b60
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web in…
aizpy Jun 26, 2023
ad1c67d
Merge branch 'Yidadaa-main'
aizpy Jun 26, 2023
ab3af39
move translation mask to the first order.
aizpy Jun 26, 2023
752e05e
Merge branch 'Yidadaa:main' into main
aizpy Jun 26, 2023
9498cac
Merge branch 'Yidadaa:main' into main
aizpy Jun 26, 2023
928385a
update default prompt
aizpy Jun 27, 2023
ed74770
Merge branch 'main' of github.com:aizpy/ChatGPT-Next-Web
aizpy Jun 27, 2023
b0f6b89
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web
actions-user Jun 28, 2023
32231cf
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web in…
aizpy Jul 2, 2023
4e916d0
Merge branch 'Yidadaa-main'
aizpy Jul 2, 2023
829f163
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web
actions-user Jul 4, 2023
7009a88
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web
actions-user Jul 5, 2023
1e06f47
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web
actions-user Jul 6, 2023
3816dbb
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web
actions-user Jul 7, 2023
89d02ac
Merge branch 'Yidadaa:main' into main
aizpy Jul 7, 2023
da5a202
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web
actions-user Jul 10, 2023
fcda58a
update mask
aizpy Jul 10, 2023
ae46bfb
Merge branch 'Yidadaa:main' into main
aizpy Jul 10, 2023
b1b38d2
Merge branch 'Yidadaa:main' into main
aizpy Jul 10, 2023
94bd077
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web
actions-user Jul 12, 2023
e159708
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web
actions-user Jul 13, 2023
91683ce
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web
actions-user Jul 14, 2023
d3d207e
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web
actions-user Jul 15, 2023
c52649a
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web
actions-user Jul 17, 2023
adcdb53
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web in…
aizpy Jul 25, 2023
fba479d
Merge branch 'Yidadaa-main'
aizpy Jul 25, 2023
917100f
fix default prompt
aizpy Jul 25, 2023
3d18527
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web
actions-user Jul 26, 2023
ea8259d
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web
actions-user Jul 27, 2023
5251830
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web
actions-user Aug 1, 2023
4a175d0
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web
actions-user Aug 2, 2023
d61704e
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web
actions-user Aug 3, 2023
b5bad30
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web
actions-user Aug 4, 2023
cd631ff
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web
actions-user Aug 5, 2023
b2f092a
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web
actions-user Aug 9, 2023
a5c6c0e
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web
actions-user Aug 10, 2023
507c8ca
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web
actions-user Aug 11, 2023
7600835
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web
actions-user Aug 13, 2023
ebc69a0
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web
actions-user Aug 15, 2023
fb568c6
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web in…
aizpy Oct 7, 2023
d3fc221
Merge branch 'Yidadaa-main'
aizpy Oct 7, 2023
486b686
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web in…
aizpy Dec 2, 2023
2a81e2b
Merge branch 'Yidadaa-main'
aizpy Dec 2, 2023
b8bda30
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web
actions-user Dec 7, 2023
307872b
Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web
actions-user Dec 12, 2023
83660b7
merge
aizpy Dec 26, 2023
b6c85cf
Merge branch 'ChatGPTNextWeb-main'
aizpy Dec 26, 2023
5a2591a
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Dec 27, 2023
1a9c5ac
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Dec 28, 2023
a17c8a3
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Dec 29, 2023
1bf082b
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Dec 31, 2023
f3f2c0f
Resolved merge conflicts
aizpy Jan 15, 2024
a97f411
Merge branch 'ChatGPTNextWeb-main'
aizpy Jan 15, 2024
5a18792
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next…
actions-user Jan 23, 2024
cd1d637
Resolved merge conflicts
aizpy Feb 22, 2024
f6bf250
Merge branch 'ChatGPTNextWeb-main'
aizpy Feb 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions app/api/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,9 @@ export async function requestOpenai(req: NextRequest) {
console.log("[Org ID]", serverConfig.openaiOrgId);
}

const timeoutId = setTimeout(
() => {
controller.abort();
},
10 * 60 * 1000,
);
const timeoutId = setTimeout(() => {
controller.abort();
}, 10 * 60 * 1000);

if (serverConfig.isAzure) {
if (!serverConfig.azureApiVersion) {
Expand Down
9 changes: 3 additions & 6 deletions app/api/google/[...path]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,9 @@ async function handle(
console.log("[Proxy] ", path);
console.log("[Base Url]", baseUrl);

const timeoutId = setTimeout(
() => {
controller.abort();
},
10 * 60 * 1000,
);
const timeoutId = setTimeout(() => {
controller.abort();
}, 10 * 60 * 1000);

const authResult = auth(req, ModelProvider.GeminiPro);
if (authResult.error) {
Expand Down
3 changes: 1 addition & 2 deletions app/client/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,7 @@ export class ClientApi {
.concat([
{
from: "human",
value:
"Share from [NextChat]: https://github.com/Yidadaa/ChatGPT-Next-Web",
value: "Share from [Aizpy]: https://chat.aizpy.com/",
},
]);
// 敬告二开开发者们,为了开源大模型的发展,请不要修改上述消息,此消息用于后续数据清洗使用
Expand Down
85 changes: 42 additions & 43 deletions app/client/platforms/google.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,59 +181,58 @@ export class GeminiProApi implements LLMApi {
const decoder = new TextDecoder();
let partialData = "";

return reader?.read().then(function processText({
done,
value,
}): Promise<any> {
if (done) {
if (response.status !== 200) {
try {
let data = JSON.parse(ensureProperEnding(partialData));
if (data && data[0].error) {
options.onError?.(new Error(data[0].error.message));
} else {
return reader
?.read()
.then(function processText({ done, value }): Promise<any> {
if (done) {
if (response.status !== 200) {
try {
let data = JSON.parse(ensureProperEnding(partialData));
if (data && data[0].error) {
options.onError?.(new Error(data[0].error.message));
} else {
options.onError?.(new Error("Request failed"));
}
} catch (_) {
options.onError?.(new Error("Request failed"));
}
} catch (_) {
options.onError?.(new Error("Request failed"));
}
}

console.log("Stream complete");
// options.onFinish(responseText + remainText);
finished = true;
return Promise.resolve();
}
console.log("Stream complete");
// options.onFinish(responseText + remainText);
finished = true;
return Promise.resolve();
}

partialData += decoder.decode(value, { stream: true });
partialData += decoder.decode(value, { stream: true });

try {
let data = JSON.parse(ensureProperEnding(partialData));
try {
let data = JSON.parse(ensureProperEnding(partialData));

const textArray = data.reduce(
(acc: string[], item: { candidates: any[] }) => {
const texts = item.candidates.map((candidate) =>
candidate.content.parts
.map((part: { text: any }) => part.text)
.join(""),
);
return acc.concat(texts);
},
[],
);
const textArray = data.reduce(
(acc: string[], item: { candidates: any[] }) => {
const texts = item.candidates.map((candidate) =>
candidate.content.parts
.map((part: { text: any }) => part.text)
.join(""),
);
return acc.concat(texts);
},
[],
);

if (textArray.length > existingTexts.length) {
const deltaArray = textArray.slice(existingTexts.length);
existingTexts = textArray;
remainText += deltaArray.join("");
if (textArray.length > existingTexts.length) {
const deltaArray = textArray.slice(existingTexts.length);
existingTexts = textArray;
remainText += deltaArray.join("");
}
} catch (error) {
// console.log("[Response Animation] error: ", error,partialData);
// skip error message when parsing json
}
} catch (error) {
// console.log("[Response Animation] error: ", error,partialData);
// skip error message when parsing json
}

return reader.read().then(processText);
});
return reader.read().then(processText);
});
})
.catch((error) => {
console.error("Error:", error);
Expand Down
2 changes: 1 addition & 1 deletion app/client/platforms/openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export class ChatGPTApi implements LLMApi {
};

controller.signal.onabort = finish;

console.log("[chatPath]", chatPath);
fetchEventSource(chatPath, {
...chatPayload,
async onopen(res) {
Expand Down
6 changes: 2 additions & 4 deletions app/components/exporter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -544,10 +544,8 @@ export function ImagePreviewer(props: {
</div>

<div>
<div className={styles["main-title"]}>NextChat</div>
<div className={styles["sub-title"]}>
github.com/Yidadaa/ChatGPT-Next-Web
</div>
<div className={styles["main-title"]}>Aizpy</div>
<div className={styles["sub-title"]}>chat.aizpy.com</div>
<div className={styles["icons"]}>
<ExportAvatar avatar={config.avatar} />
<span className={styles["icon-space"]}>&</span>
Expand Down
2 changes: 1 addition & 1 deletion app/components/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useState, useEffect } from "react";

import styles from "./home.module.scss";

import BotIcon from "../icons/bot.svg";
import BotIcon from "../icons/chatgpt.svg";
import LoadingIcon from "../icons/three-dots.svg";

import { getCSSVar, useMobileScreen } from "../utils";
Expand Down
10 changes: 7 additions & 3 deletions app/components/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,10 @@ export function SideBar(props: { className?: string }) {
>
<div className={styles["sidebar-header"]} data-tauri-drag-region>
<div className={styles["sidebar-title"]} data-tauri-drag-region>
NextChat
Aizpy
</div>
<div className={styles["sidebar-sub-title"]}>
Build your own AI assistant.
Your personal AI assistant.
</div>
<div className={styles["sidebar-logo"] + " no-dark"}>
<ChatGptIcon />
Expand Down Expand Up @@ -217,7 +217,11 @@ export function SideBar(props: { className?: string }) {
</Link>
</div>
<div className={styles["sidebar-action"]}>
<a href={REPO_URL} target="_blank" rel="noopener noreferrer">
<a
href="https://github.com/aizpy"
target="_blank"
rel="noopener noreferrer"
>
<IconButton icon={<GithubIcon />} shadow />
</a>
</div>
Expand Down
5 changes: 3 additions & 2 deletions app/constant.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const OWNER = "Yidadaa";
export const OWNER = "aizpy";
export const REPO = "ChatGPT-Next-Web";
export const REPO_URL = `https://github.com/${OWNER}/${REPO}`;
export const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;
Expand Down Expand Up @@ -95,7 +95,8 @@ export const Google = {

export const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang
export const DEFAULT_SYSTEM_TEMPLATE = `
You are ChatGPT, a large language model trained by {{ServiceProvider}}.
The following information can be used to supplement your personal information, but you do not need to proactively tell others unless they ask:
"Aizpy" is a name made up of the combination of the words "AI" (artificial intelligence) and "zippy".
Knowledge cutoff: {{cutoff}}
Current model: {{model}}
Current time: {{time}}
Expand Down
35 changes: 34 additions & 1 deletion app/icons/black-bot.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/icons/bot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading