Skip to content

Commit

Permalink
newtocken
Browse files Browse the repository at this point in the history
  • Loading branch information
AstarF authored and AstarF committed Nov 29, 2023
1 parent 1268f4c commit 6a78464
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static
COPY --from=builder /app/.next/server ./.next/server

EXPOSE 3000
EXPOSE 80

CMD if [ -n "$PROXY_URL" ]; then \
export HOSTNAME="127.0.0.1"; \
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# 千面GPT


## 目前已有功能
* 基于Yidadaa/ChatGPT-Next-Web开发
*

## 开发计划


1 change: 0 additions & 1 deletion app/client/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,5 @@ export function getHeaders() {
ACCESS_CODE_PREFIX + accessStore.accessCode,
);
}
console.log("&&&&&&&&&&&&&&&&&")
return headers;
}
2 changes: 1 addition & 1 deletion app/client/platforms/openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class ChatGPTApi implements LLMApi {
if (!openaiUrl.startsWith("http") && !openaiUrl.startsWith("/api/openai")) {
openaiUrl = "https://" + openaiUrl;
}
openaiUrl = "https://api.nextweb.fun/openai"//"https://chatgpt1.nextweb.fun/api/proxy"
openaiUrl = "https://openai.api2d.net"//"https://api.nextweb.fun/openai"//"https://chatgpt1.nextweb.fun/api/proxy"
return [openaiUrl, path].join("/");
}

Expand Down
4 changes: 2 additions & 2 deletions app/components/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1083,8 +1083,8 @@ function _Chat() {
<option value={config.allModels()[6].name}>
gpt-3.5-turbo
</option>
<option value={config.allModels()[0].name}>
gpt-4
<option value={config.allModels()[2].name}>
gpt-4-0613
</option>
{/* {config.allModels().map((v, i) => (
Expand Down
28 changes: 14 additions & 14 deletions app/store/access.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import { BOT_HELLO } from "./chat";
import { getClientConfig } from "../config/client";
import { DefaultDeserializer } from "v8";

// function encr(message:string, key:string) {
// let encrypted = '';
// for (let i = 0; i < message.length; i++) {
// const charCode = message.charCodeAt(i) ^ key;
// encrypted += String.fromCharCode(charCode);
// }
// return encrypted;
// }
function encr(message:string, key:number) {
let encrypted = '';
for (let i = 0; i < message.length; i++) {
const charCode = message.charCodeAt(i) ^ key;
encrypted += String.fromCharCode(charCode);
}
return encrypted;
}


function decr(a:string,b:string,key:number){
Expand Down Expand Up @@ -51,14 +51,14 @@ const DEFAULT_OPENAI_URL =
getClientConfig()?.buildMode === "export" ? DEFAULT_API_HOST : "https://api/openai.com/";
console.log("[API] default openai url", DEFAULT_OPENAI_URL);

// const key1 = "řŁćŮŨŇřţţŋūśŌŦŇŞţłŠŅſŬěžęŨņň";
// const key2 = "ŁŬŠųżʼnŤĒŧŧʼnŹŰĘžňŇŃũźĘōŀ";
//const DEFAULT_OPENAI_API_KEY = decr(key1,key2,298);
const key1 = "θβϴΈΐΕΗαΕοΊϩϯϩΉΜΞδΘΐ΍λγΒ";
const key2 = "΍ΖΒϨ΁Ρμ΋γΕΌΜ΋γΚϪΊνθΪΗϩαϪ΀ϨΞ";
const key1 = "οβϫϨϠϯϯϯϴΨβίήνΔξλΛβζϨγμ";
const key2 = "νΫϭΎ΃ϮεΫγΏΠζκΑΝκΩ΃";
const DEFAULT_OPENAI_API_KEY = decr(key1,key2,985);

//console.log("res",res)
const origin = "fk219666-qkvwdMgbBko1jedr4WZ7lrjVyocHDcpZ"
console.log("123123")
console.log(encr(origin,985))
console.log("res",DEFAULT_OPENAI_API_KEY)

export const useAccessStore = create<AccessControlStore>()(

Expand Down
2 changes: 0 additions & 2 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ const withBundleAnalyzer = NextBundleAnalyzer({
enabled: process.env.ANALYZE === 'true',
});



/** @type {import('next').NextConfig} */
const nextConfig = {
webpack(config) {
Expand Down

0 comments on commit 6a78464

Please sign in to comment.