v1.7.4-beta4 fix bugs

This commit is contained in:
lanqian528 2024-12-04 08:47:47 +08:00
parent b482d84387
commit 7261d17373
3 changed files with 49 additions and 41 deletions

View File

@ -245,7 +245,7 @@ async def chatgpt_reverse_proxy(request: Request, path: str):
background=background)
response.set_cookie("conv_key", value=conv_key)
return response
elif 'image' in r.headers.get("content-type", ""):
elif 'image' in r.headers.get("content-type", "") or "audio" in r.headers.get("content-type", "") or "video" in r.headers.get("content-type", ""):
rheaders = dict(r.headers)
response = Response(content=await r.acontent(), headers=rheaders,
status_code=r.status_code, background=background)
@ -256,14 +256,22 @@ async def chatgpt_reverse_proxy(request: Request, path: str):
status_code=r.status_code, background=background)
else:
content = await r.atext()
content = (content
.replace("ab.chatgpt.com", origin_host)
.replace("webrtc.chatgpt.com", origin_host)
.replace("cdn.oaistatic.com", origin_host)
# .replace("files.oaiusercontent.com", origin_host)
.replace("https://chatgpt.com", "")
.replace("https", petrol))
if "public-api/" in path:
content = (content
.replace("ab.chatgpt.com", origin_host)
.replace("webrtc.chatgpt.com", origin_host)
.replace("cdn.oaistatic.com", origin_host)
# .replace("files.oaiusercontent.com", origin_host)
.replace("chatgpt.com", "")
.replace("https", petrol))
else:
content = (content
.replace("ab.chatgpt.com", origin_host)
.replace("webrtc.chatgpt.com", origin_host)
.replace("cdn.oaistatic.com", origin_host)
# .replace("files.oaiusercontent.com", origin_host)
.replace("chatgpt.com", origin_host)
.replace("https", petrol))
rheaders = dict(r.headers)
content_type = rheaders.get("content-type", "")
cache_control = rheaders.get("cache-control", "")

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html data-build="prod-d4e6aadd9060851842525ffd80f4803ede405414" dir="ltr" class="">
<html data-build="prod-29a8efc4cbe23593eaf2ae6b6f8f30a6385fe747" dir="ltr" class="">
<head>
<meta charSet="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
@ -18,30 +18,30 @@
<meta property="og:title" content="ChatGPT"/>
<meta property="og:image" content="/assets/chatgpt-share-og-u7j5uyao.webp"/>
<meta property="og:url" content="https://chatgpt.com"/>
<link rel="modulepreload" href="/assets/manifest-fb88fd1c.js"/>
<link rel="modulepreload" href="/assets/k870cnjqvv1wsd2q.js"/>
<link rel="modulepreload" href="/assets/lrt789z2rawt9v6n.js"/>
<link rel="modulepreload" href="/assets/d7gqhmxyzfulu8ms.js"/>
<link rel="modulepreload" href="/assets/qm9djk421n6v15er.js"/>
<link rel="modulepreload" href="/assets/cvpz28n10nczd2qv.js"/>
<link rel="modulepreload" href="/assets/hfjc0cg18t70twkp.js"/>
<link rel="modulepreload" href="/assets/ga842uuse918os7p.js"/>
<link rel="modulepreload" href="/assets/orvu0y3lq8gw4rle.js"/>
<link rel="modulepreload" href="/assets/lemkh62t0k2tpk17.js"/>
<link rel="modulepreload" href="/assets/lfl9q1ra3himjl15.js"/>
<link rel="modulepreload" href="/assets/oj6qvnn613i8efeb.js"/>
<link rel="modulepreload" href="/assets/cqhnt242jawpw4n5.js"/>
<link rel="modulepreload" href="/assets/fxv70hg9u03q7fmv.js"/>
<link rel="modulepreload" href="/assets/o6ivl8lube32l54t.js"/>
<link rel="modulepreload" href="/assets/e0o1s2czdwq08bpj.js"/>
<link rel="modulepreload" href="/assets/kqmevmaenb7njmaz.js"/>
<link rel="modulepreload" href="/assets/mmbqunmky4x3dwvj.js"/>
<link rel="modulepreload" href="/assets/nqhdnktks2nuzl68.js"/>
<link rel="modulepreload" href="/assets/e2k9g3xhsh29s84e.js"/>
<link rel="modulepreload" href="/assets/8fbnq60f77qaai93.js"/>
<link rel="modulepreload" href="/assets/eo69wvbwj64yg0a7.js"/>
<link rel="modulepreload" href="/assets/manifest-02df4098.js"/>
<link rel="modulepreload" href="/assets/e5bysna0b8zobmag.js"/>
<link rel="modulepreload" href="/assets/dkrkpapzk8i632go.js"/>
<link rel="modulepreload" href="/assets/j6gkove76o4ch0ty.js"/>
<link rel="modulepreload" href="/assets/fow2c4yq3c8klomi.js"/>
<link rel="modulepreload" href="/assets/bf2p2f1vepq4y3f7.js"/>
<link rel="modulepreload" href="/assets/efbm65hm6xsu7gia.js"/>
<link rel="modulepreload" href="/assets/fnh1ee9l40s79ybh.js"/>
<link rel="modulepreload" href="/assets/ey5apunl1vnvf9g5.js"/>
<link rel="modulepreload" href="/assets/ivsfom077coy2e1x.js"/>
<link rel="modulepreload" href="/assets/ofdx6gir03c2dglj.js"/>
<link rel="modulepreload" href="/assets/dgwshraa8ui7irnp.js"/>
<link rel="modulepreload" href="/assets/znrwq6qdoakbx8c5.js"/>
<link rel="modulepreload" href="/assets/ipumxevpyo0r1zke.js"/>
<link rel="modulepreload" href="/assets/jqqo55reqowwgoc4.js"/>
<link rel="modulepreload" href="/assets/dkptqlxvdk2bhhas.js"/>
<link rel="modulepreload" href="/assets/mwbuo0yv1rlpzhci.js"/>
<link rel="modulepreload" href="/assets/ixhgxacwo4rec3g4.js"/>
<link rel="modulepreload" href="/assets/ohjx34ealw57wtov.js"/>
<link rel="modulepreload" href="/assets/ffzyzw8q2vjgtytc.js"/>
<link rel="modulepreload" href="/assets/otr73oks8k0fyvxy.js"/>
<link rel="modulepreload" href="/assets/nklvdpoxrgpd3hmb.js"/>
<link rel="modulepreload" href="/assets/jjr9on9cxlrbskjq.js"/>
<link rel="stylesheet" href="/assets/root-o085mhci.css"/>
<link rel="stylesheet" href="/assets/root-k8yvx6b6.css"/>
<link rel="stylesheet" href="/assets/conversation-small-lkohtmkm.css"/>
</head>
<body class="">
@ -157,7 +157,7 @@
<div class="max-w-full flex-1">
<div class="_prosemirror-parent_15ceg_1 text-token-text-primary max-h-[25dvh] max-h-52 overflow-auto default-browser">
<textarea class="block h-10 w-full resize-none border-0 bg-transparent px-0 py-2 text-token-text-primary placeholder:text-token-text-secondary" autofocus="" placeholder="Message ChatGPT"></textarea>
<script nonce="4fce7440-fa5b-4791-9f2c-b1d6807d2708">
<script nonce="e92906e6-e5fd-444f-803b-dd857bdafea6">
window.__oai_logHTML ? window.__oai_logHTML() : window.__oai_SSR_HTML = window.__oai_SSR_HTML || Date.now();
requestAnimationFrame((function() {
window.__oai_logTTI ? window.__oai_logTTI() : window.__oai_SSR_TTI = window.__oai_SSR_TTI || Date.now()
@ -228,7 +228,7 @@
<div aria-live="assertive" aria-atomic="true" class="sr-only"></div>
<div aria-live="polite" aria-atomic="true" class="sr-only"></div>
<audio class="fixed bottom-0 left-0 hidden h-0 w-0" autoPlay="" crossorigin="anonymous"></audio>
<script nonce="4fce7440-fa5b-4791-9f2c-b1d6807d2708">
<script nonce="e92906e6-e5fd-444f-803b-dd857bdafea6">
window.__remixContext = {{ remix_context|tojson }};
__remixContext.p = function(v, e, p, x) {
if (typeof e !== 'undefined') {
@ -279,10 +279,10 @@
;
Object.assign(__remixContext.state.loaderData["routes/_conversation"], {});
</script>
<script nonce="4fce7440-fa5b-4791-9f2c-b1d6807d2708" type="module" async="">
import "/assets/manifest-fb88fd1c.js";
import*as route0 from "/assets/cvpz28n10nczd2qv.js";
import*as route1 from "/assets/eo69wvbwj64yg0a7.js";
<script nonce="e92906e6-e5fd-444f-803b-dd857bdafea6" type="module" async="">
import "/assets/manifest-02df4098.js";
import*as route0 from "/assets/bf2p2f1vepq4y3f7.js";
import*as route1 from "/assets/nklvdpoxrgpd3hmb.js";
import*as route2 from "/assets/jjr9on9cxlrbskjq.js";
window.__remixRouteModules = {
@ -291,7 +291,7 @@
"routes/_conversation._index": route2
};
import("/assets/k870cnjqvv1wsd2q.js");
import("/assets/e5bysna0b8zobmag.js");
</script>
</body>
</html>

View File

@ -1 +1 @@
v1.7.4-beta3
v1.7.4-beta4