Skip to content

Commit

Permalink
fix: update ui version
Browse files Browse the repository at this point in the history
  • Loading branch information
liuhuapiaoyuan committed Feb 18, 2024
1 parent bb9d470 commit c2cf4d1
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 11 deletions.
8 changes: 5 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
"ms-ceintl.vscode-language-pack-zh-hans",
"esbenp.prettier-vscode",
"vue.volar",
"sourcegraph.cody-ai"
"chunsen.bracket-select",
"golang.go",
"FittenTech.Fitten-Code",
"vscode-icons-team.vscode-icons"
]
}
},
Expand All @@ -32,6 +35,5 @@
"HTTP_PROXY":"",
"HTTPS_PROXY":""
},
"postCreateCommand": "make init",
"remoteUser": "root"
"postCreateCommand": "make init"
}
29 changes: 21 additions & 8 deletions backend-api/backend-api.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,27 @@ func AttachGPT4Mobile(ctx g.Ctx, response *http.Response) error {
return returnValue
}
modifiedBody := string(originalBody)
if strings.Contains(modifiedBody, "gpt-4") {
resJson := gjson.New(modifiedBody)
models := resJson.Get("models").Array()
newObject := gjson.New(`{"capabilities":{},"description":"Browsing, Advanced Data Analysis, and DALL·E are now built into GPT-4","enabled_tools":["tools","tools2"],"max_tokens":32767,"product_features":{"attachments":{"accepted_mime_types":["text/x-csharp","application/vnd.openxmlformats-officedocument.wordprocessingml.document","text/x-tex","text/x-typescript","text/plain","text/x-ruby","application/msword","text/x-php","text/x-c++","text/markdown","application/x-latext","text/x-c","text/javascript","text/html","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/json","text/x-java","application/pdf","text/x-script.python","text/x-sh"],"can_accept_all_mime_types":true,"image_mime_types":["image/jpeg","image/webp","image/gif","image/png"],"type":"retrieval"}},"slug":"gpt-4-mobile","tags":["confidential","gpt4","plus"],"title":"GPT4 (Mobile)"}`)
models = append(models, newObject)
resJson.Set("models", models)
modifiedBody = resJson.String()
}
// if strings.Contains(modifiedBody, "gpt-4") {
// }
resJson := gjson.New(modifiedBody)
models := resJson.Get("models").Array()
newObject := gjson.New(`{"capabilities":{},"description":"Browsing, Advanced Data Analysis, and DALL·E are now built into GPT-4","enabled_tools":["tools","tools2"],"max_tokens":32767,"product_features":{"attachments":{"accepted_mime_types":["text/x-csharp","application/vnd.openxmlformats-officedocument.wordprocessingml.document","text/x-tex","text/x-typescript","text/plain","text/x-ruby","application/msword","text/x-php","text/x-c++","text/markdown","application/x-latext","text/x-c","text/javascript","text/html","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/json","text/x-java","application/pdf","text/x-script.python","text/x-sh"],"can_accept_all_mime_types":true,"image_mime_types":["image/jpeg","image/webp","image/gif","image/png"],"type":"retrieval"}},"slug":"gpt-4-mobile","tags":["confidential","gpt4","plus"],"title":"GPT4 (Mobile)"}`)
models = append(models, newObject)
resJson.Set("models", models)

categories := resJson.Get("categories").Array()

categories = append(categories, gjson.New(`{
"category": "gpt_4",
"human_category_name": "GPT-4",
"subscription_level": "plus",
"default_model": "gpt-4",
"browsing_model": "gpt-4-browsing",
"code_interpreter_model": "gpt-4-code-interpreter",
"plugins_model": "gpt-4-plugins"
}`))
resJson.Set("categories", categories)
modifiedBody = resJson.String()
// 将修改后的内容写回响应体
response.Body = io.NopCloser(bytes.NewBufferString(modifiedBody))
// 更新Content-Length
Expand Down
1 change: 1 addition & 0 deletions resource/template/LxJWDayKNMzRjO_Ay4ljN/chat.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html><html data-build="prod-2881e9c"><head>{{.envScript}}<meta charSet="utf-8" /><link rel="apple-touch-icon" sizes="180x180" href="{{.assetPrefix}}/_next/static/media/apple-touch-icon.59f2e898.png" /><link rel="icon" type="image/png" sizes="32x32" href="{{.assetPrefix}}/_next/static/media/favicon-32x32.be48395e.png" /><link rel="icon" type="image/png" sizes="16x16" href="{{.assetPrefix}}/_next/static/media/favicon-16x16.9b8dbb69.png" /><link rel="preconnect" href="{{.assetPrefix}}" /><title>ChatGPT</title><meta name="title" content="ChatGPT: Get instant answers, find inspiration, learn something new" /><meta name="description" content="ChatGPT is a free-to-use AI system. Use it for engaging conversations, gain insights, automate tasks, and witness the future of AI, all in one place." /><meta name="keywords" content="ai chat,ai,chap gpt,chat gbt,chat gpt 3,chat gpt login,chat gpt website,chat gpt,chat gtp,chat openai,chat,chatai,chatbot gpt,chatg,chatgpt login,chatgpt,gpt chat,open ai,openai chat,openai chatgpt,openai" /><meta property="og:description" content="A conversational AI system that listens, learns, and challenges" /><meta name="robots" content="index, follow" /><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /><meta property="og:title" content="ChatGPT" /><meta property="og:image" content="{{.assetPrefix}}/_next/static/media/chatgpt-share-og.49cbbffe.png" /><meta property="og:url" content="https://chat.openai.com" /><meta name="apple-itunes-app" content="app-id=6448311069" /><meta name="next-head-count" content="17" /><link rel="preload" href="{{.assetPrefix}}/_next/static/media/soehne-buch.13189857.woff2" as="font" crossorigin /><link rel="preload" href="{{.assetPrefix}}/_next/static/media/soehne-halbfett.977f1845.woff2" as="font" crossorigin /><link rel="preload" href="{{.assetPrefix}}/_next/static/media/soehne-mono-buch.de677af1.woff2" as="font" crossorigin /><link rel="preload" href="{{.assetPrefix}}/_next/static/media/soehne-mono-halbfett.b082e8e2.woff2" as="font" crossorigin /><link data-next-font rel="preconnect" href="/" crossorigin="anonymous" /><link rel="preload" href="{{.assetPrefix}}/_next/static/css/470a2be8131ee7c0.css" as="style" crossorigin="anonymous" /><link rel="stylesheet" href="{{.assetPrefix}}/_next/static/css/470a2be8131ee7c0.css" crossorigin="anonymous" data-n-g /><noscript data-n-css></noscript><script defer crossorigin="anonymous" nomodule src="{{.assetPrefix}}/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="{{.assetPrefix}}/_next/static/chunks/webpack-3b4f1364e361da69.js" defer crossorigin="anonymous"></script><script src="{{.assetPrefix}}/_next/static/chunks/framework-31ffa51d236da229.js" defer crossorigin="anonymous"></script><script src="{{.assetPrefix}}/_next/static/chunks/main-6da2aad3a6c32aae.js" defer crossorigin="anonymous"></script><script src="{{.assetPrefix}}/_next/static/chunks/pages/_app-226fb5ab17dbc028.js" defer crossorigin="anonymous"></script><script src="{{.assetPrefix}}/_next/static/chunks/pages/%5B%5B...default%5D%5D-3dd94988ec89b0b8.js" defer crossorigin="anonymous"></script><script src="{{.assetPrefix}}/_next/static/LxJWDayKNMzRjO_Ay4ljN/_buildManifest.js" defer crossorigin="anonymous"></script><script src="{{.assetPrefix}}/_next/static/LxJWDayKNMzRjO_Ay4ljN/_ssgManifest.js" defer crossorigin="anonymous"></script></head><body class="antialiased"><div id="__next"><script>!function(){try{var d=document.documentElement,c=d.classList;c.remove('light','dark');var e=localStorage.getItem('theme');if('system'===e||(!e&&true)){var t='(prefers-color-scheme: dark)',m=window.matchMedia(t);if(m.media!==t||m.matches){d.style.colorScheme = 'dark';c.add('dark')}else{d.style.colorScheme = 'light';c.add('light')}}else if(e){c.add(e|| '')}if(e==='light'||e==='dark')d.style.colorScheme=e}catch(e){}}()</script><div class="relative z-0 flex h-full w-full overflow-hidden"><div class="relative flex h-full max-w-full flex-1 flex-col overflow-hidden"><main class="relative h-full w-full flex-1 overflow-auto transition-width"></main></div></div><div class="absolute left-0 right-0 top-0 z-[2]"></div></div><script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">{{.props}}</script><script></script></body></html>
1 change: 1 addition & 0 deletions resource/template/LxJWDayKNMzRjO_Ay4ljN/discovery.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html><html data-build="prod-2881e9c"><head>{{.envScript}}<meta charSet="utf-8" /><link rel="apple-touch-icon" sizes="180x180" href="{{.assetPrefix}}/_next/static/media/apple-touch-icon.59f2e898.png" /><link rel="icon" type="image/png" sizes="32x32" href="{{.assetPrefix}}/_next/static/media/favicon-32x32.be48395e.png" /><link rel="icon" type="image/png" sizes="16x16" href="{{.assetPrefix}}/_next/static/media/favicon-16x16.9b8dbb69.png" /><link rel="preconnect" href="{{.assetPrefix}}" /><title>ChatGPT</title><meta name="title" content="ChatGPT: Get instant answers, find inspiration, learn something new" /><meta name="description" content="ChatGPT is a free-to-use AI system. Use it for engaging conversations, gain insights, automate tasks, and witness the future of AI, all in one place." /><meta name="keywords" content="ai chat,ai,chap gpt,chat gbt,chat gpt 3,chat gpt login,chat gpt website,chat gpt,chat gtp,chat openai,chat,chatai,chatbot gpt,chatg,chatgpt login,chatgpt,gpt chat,open ai,openai chat,openai chatgpt,openai" /><meta property="og:description" content="A conversational AI system that listens, learns, and challenges" /><meta name="robots" content="index, follow" /><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /><meta property="og:title" content="ChatGPT" /><meta property="og:image" content="{{.assetPrefix}}/_next/static/media/chatgpt-share-og.49cbbffe.png" /><meta property="og:url" content="https://chat.openai.com" /><meta name="apple-itunes-app" content="app-id=6448311069" /><meta name="next-head-count" content="17" /><link rel="preload" href="{{.assetPrefix}}/_next/static/media/soehne-buch.13189857.woff2" as="font" crossorigin /><link rel="preload" href="{{.assetPrefix}}/_next/static/media/soehne-halbfett.977f1845.woff2" as="font" crossorigin /><link rel="preload" href="{{.assetPrefix}}/_next/static/media/soehne-mono-buch.de677af1.woff2" as="font" crossorigin /><link rel="preload" href="{{.assetPrefix}}/_next/static/media/soehne-mono-halbfett.b082e8e2.woff2" as="font" crossorigin /><link data-next-font rel="preconnect" href="/" crossorigin="anonymous" /><link rel="preload" href="{{.assetPrefix}}/_next/static/css/470a2be8131ee7c0.css" as="style" crossorigin="anonymous" /><link rel="stylesheet" href="{{.assetPrefix}}/_next/static/css/470a2be8131ee7c0.css" crossorigin="anonymous" data-n-g /><noscript data-n-css></noscript><script defer crossorigin="anonymous" nomodule src="{{.assetPrefix}}/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="{{.assetPrefix}}/_next/static/chunks/webpack-3b4f1364e361da69.js" defer crossorigin="anonymous"></script><script src="{{.assetPrefix}}/_next/static/chunks/framework-31ffa51d236da229.js" defer crossorigin="anonymous"></script><script src="{{.assetPrefix}}/_next/static/chunks/main-6da2aad3a6c32aae.js" defer crossorigin="anonymous"></script><script src="{{.assetPrefix}}/_next/static/chunks/pages/_app-226fb5ab17dbc028.js" defer crossorigin="anonymous"></script><script src="{{.assetPrefix}}/_next/static/chunks/pages/gpts-904a871f1091c1c5.js" defer crossorigin="anonymous"></script><script src="{{.assetPrefix}}/_next/static/LxJWDayKNMzRjO_Ay4ljN/_buildManifest.js" defer crossorigin="anonymous"></script><script src="{{.assetPrefix}}/_next/static/LxJWDayKNMzRjO_Ay4ljN/_ssgManifest.js" defer crossorigin="anonymous"></script></head><body class="antialiased"><div id="__next"><script>!function(){try{var d=document.documentElement,c=d.classList;c.remove('light','dark');var e=localStorage.getItem('theme');if('system'===e||(!e&&true)){var t='(prefers-color-scheme: dark)',m=window.matchMedia(t);if(m.media!==t||m.matches){d.style.colorScheme = 'dark';c.add('dark')}else{d.style.colorScheme = 'light';c.add('light')}}else if(e){c.add(e|| '')}if(e==='light'||e==='dark')d.style.colorScheme=e}catch(e){}}()</script><div class="absolute left-0 right-0 top-0 z-[2]"></div></div><script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">{{.props}}</script><script></script></body></html>
1 change: 1 addition & 0 deletions resource/template/LxJWDayKNMzRjO_Ay4ljN/editor.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html><html data-build="prod-2881e9c"><head>{{.envScript}}<meta charSet="utf-8" /><link rel="apple-touch-icon" sizes="180x180" href="{{.assetPrefix}}/_next/static/media/apple-touch-icon.59f2e898.png" /><link rel="icon" type="image/png" sizes="32x32" href="{{.assetPrefix}}/_next/static/media/favicon-32x32.be48395e.png" /><link rel="icon" type="image/png" sizes="16x16" href="{{.assetPrefix}}/_next/static/media/favicon-16x16.9b8dbb69.png" /><link rel="preconnect" href="{{.assetPrefix}}" /><title>ChatGPT</title><meta name="title" content="ChatGPT: Get instant answers, find inspiration, learn something new" /><meta name="description" content="ChatGPT is a free-to-use AI system. Use it for engaging conversations, gain insights, automate tasks, and witness the future of AI, all in one place." /><meta name="keywords" content="ai chat,ai,chap gpt,chat gbt,chat gpt 3,chat gpt login,chat gpt website,chat gpt,chat gtp,chat openai,chat,chatai,chatbot gpt,chatg,chatgpt login,chatgpt,gpt chat,open ai,openai chat,openai chatgpt,openai" /><meta property="og:description" content="A conversational AI system that listens, learns, and challenges" /><meta name="robots" content="index, follow" /><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /><meta property="og:title" content="ChatGPT" /><meta property="og:image" content="{{.assetPrefix}}/_next/static/media/chatgpt-share-og.49cbbffe.png" /><meta property="og:url" content="https://chat.openai.com" /><meta name="apple-itunes-app" content="app-id=6448311069" /><meta name="next-head-count" content="17" /><link rel="preload" href="{{.assetPrefix}}/_next/static/media/soehne-buch.13189857.woff2" as="font" crossorigin /><link rel="preload" href="{{.assetPrefix}}/_next/static/media/soehne-halbfett.977f1845.woff2" as="font" crossorigin /><link rel="preload" href="{{.assetPrefix}}/_next/static/media/soehne-mono-buch.de677af1.woff2" as="font" crossorigin /><link rel="preload" href="{{.assetPrefix}}/_next/static/media/soehne-mono-halbfett.b082e8e2.woff2" as="font" crossorigin /><link data-next-font rel="preconnect" href="/" crossorigin="anonymous" /><link rel="preload" href="{{.assetPrefix}}/_next/static/css/470a2be8131ee7c0.css" as="style" crossorigin="anonymous" /><link rel="stylesheet" href="{{.assetPrefix}}/_next/static/css/470a2be8131ee7c0.css" crossorigin="anonymous" data-n-g /><noscript data-n-css></noscript><script defer crossorigin="anonymous" nomodule src="{{.assetPrefix}}/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="{{.assetPrefix}}/_next/static/chunks/webpack-3b4f1364e361da69.js" defer crossorigin="anonymous"></script><script src="{{.assetPrefix}}/_next/static/chunks/framework-31ffa51d236da229.js" defer crossorigin="anonymous"></script><script src="{{.assetPrefix}}/_next/static/chunks/main-6da2aad3a6c32aae.js" defer crossorigin="anonymous"></script><script src="{{.assetPrefix}}/_next/static/chunks/pages/_app-226fb5ab17dbc028.js" defer crossorigin="anonymous"></script><script src="{{.assetPrefix}}/_next/static/chunks/1992-22ff5a532c7d5b50.js" defer crossorigin="anonymous"></script><script src="{{.assetPrefix}}/_next/static/chunks/pages/gpts/editor-0c6d1961349ade9f.js" defer crossorigin="anonymous"></script><script src="{{.assetPrefix}}/_next/static/LxJWDayKNMzRjO_Ay4ljN/_buildManifest.js" defer crossorigin="anonymous"></script><script src="{{.assetPrefix}}/_next/static/LxJWDayKNMzRjO_Ay4ljN/_ssgManifest.js" defer crossorigin="anonymous"></script></head><body class="antialiased"><div id="__next"><script>!function(){try{var d=document.documentElement,c=d.classList;c.remove('light','dark');var e=localStorage.getItem('theme');if('system'===e||(!e&&true)){var t='(prefers-color-scheme: dark)',m=window.matchMedia(t);if(m.media!==t||m.matches){d.style.colorScheme = 'dark';c.add('dark')}else{d.style.colorScheme = 'light';c.add('light')}}else if(e){c.add(e|| '')}if(e==='light'||e==='dark')d.style.colorScheme=e}catch(e){}}()</script><div class="absolute left-0 right-0 top-0 z-[2]"></div></div><script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">{{.props}}</script><script></script></body></html>
Loading

0 comments on commit c2cf4d1

Please sign in to comment.