v1.7.5-beta2 fix bugs
Some checks failed
Build Docker Image (dev) / main (push) Has been cancelled

This commit is contained in:
lanqian528 2024-12-06 17:53:48 +08:00
parent fd95919fc2
commit 991b59de4e
4 changed files with 12 additions and 7 deletions

View File

@ -288,6 +288,7 @@ class ChatService:
if self.gizmo_id:
conversation_mode = {"kind": "gizmo_interaction", "gizmo_id": self.gizmo_id}
logger.info(f"Gizmo id: {self.gizmo_id}")
else:
conversation_mode = {"kind": "primary_assistant"}

View File

@ -13,7 +13,7 @@ from chatgpt.authorization import verify_token, get_req_token
from chatgpt.fp import get_fp
from utils.Client import Client
from utils.Logger import logger
from utils.configs import chatgpt_base_url_list, sentinel_proxy_url_list, force_no_history
from utils.configs import chatgpt_base_url_list, sentinel_proxy_url_list, force_no_history, file_host, voice_host
def generate_current_time():
@ -259,17 +259,17 @@ async def chatgpt_reverse_proxy(request: Request, path: str):
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("webrtc.chatgpt.com", voice_host if voice_host else "webrtc.chatgpt.com")
.replace("files.oaiusercontent.com", file_host if file_host else "files.oaiusercontent.com")
.replace("https://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("webrtc.chatgpt.com", voice_host if voice_host else "webrtc.chatgpt.com")
.replace("files.oaiusercontent.com", file_host if file_host else "files.oaiusercontent.com")
.replace("chatgpt.com", origin_host)
.replace("https", petrol))
rheaders = dict(r.headers)

View File

@ -31,6 +31,8 @@ if not ark0se_token_url:
proxy_url = os.getenv('PROXY_URL', '').replace(' ', '')
sentinel_proxy_url = os.getenv('SENTINEL_PROXY_URL', None)
export_proxy_url = os.getenv('EXPORT_PROXY_URL', None)
file_host = os.getenv('FILE_HOST', None)
voice_host = os.getenv('VOICE_HOST', None)
impersonate_list_str = os.getenv('IMPERSONATE', '[]')
user_agents_list_str = os.getenv('USER_AGENTS', '[]')
device_tuple_str = os.getenv('DEVICE_TUPLE', '()')
@ -82,6 +84,8 @@ logger.info("------------------------- Request --------------------------")
logger.info("CHATGPT_BASE_URL: " + str(chatgpt_base_url_list))
logger.info("PROXY_URL: " + str(proxy_url_list))
logger.info("EXPORT_PROXY_URL: " + str(export_proxy_url))
logger.info("FILE_HOST: " + str(file_host))
logger.info("VOICE_HOST: " + str(voice_host))
logger.info("IMPERSONATE: " + str(impersonate_list))
logger.info("USER_AGENTS: " + str(user_agents_list))
logger.info("---------------------- Functionality -----------------------")

View File

@ -1 +1 @@
v1.7.5-beta1
v1.7.5-beta2