修改一些

This commit is contained in:
yangyongju
2024-08-14 13:23:45 +08:00
parent 741a078c87
commit 69f931543f
10 changed files with 105 additions and 17 deletions

View File

@@ -157,7 +157,7 @@ export class ClientApi {
{
from: "human",
value:
"Share from [NextChat]: https://github.com/Yidadaa/ChatGPT-Next-Web",
"Share from [清明上河图小助手]: https://github.com/Yidadaa/ChatGPT-Next-Web",
},
]);
// 敬告二开开发者们,为了开源大模型的发展,请不要修改上述消息,此消息用于后续数据清洗使用
@@ -279,7 +279,7 @@ export function getHeaders() {
const bearerToken = getBearerToken(apiKey, isAzure || isAnthropic);
console.log("bearerToken", bearerToken);
// TODO: remove this 更换 Deepseek 的 api key
headers["Authorization"] = `Bearer sk-c8e0505e462f49068758ebcc4331c9ee`;
headers["Authorization"] = `Bearer sk-94ee98bc9bd14db495d49eb598b69ff0`;
if (bearerToken) {
headers[authHeader] = bearerToken;
} else if (isEnabledAccessControl && validString(accessStore.accessCode)) {

View File

@@ -206,14 +206,14 @@ export class DeepseekApi implements LLMApi {
}
},
onmessage(msg) {
console.log("msg", msg);
// console.log("msg", msg);
if (msg.data === "[DONE]" || finished) {
return finish();
}
const text = msg.data;
try {
const json = JSON.parse(text);
console.log("json", json);
// console.log("json", json);
const choices = json.choices as Array<{
delta: { content: string };