Closed PisLuanyao closed 1 week ago
暂时没有头绪。cookie信息可能包含敏感信息,不用发上来。
可以在index.mjs的开头加上这两句看看输出
console.log(import.meta);
console.log(process.env);
luanyao@VM-Huawei-0-301 /d/Github/YOUChat_Proxy (bypass-cf)
$ node index.mjs
node:internal/modules/esm/resolve:854
throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base), null);
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'express' imported from D:\Github\YOUChat_Proxy\index.mjs
at packageResolve (node:internal/modules/esm/resolve:854:9)
at moduleResolve (node:internal/modules/esm/resolve:927:18)
at defaultResolve (node:internal/modules/esm/resolve:1157:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:383:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:352:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:227:38)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:87:39)
at link (node:internal/modules/esm/module_job:86:36) {
code: 'ERR_MODULE_NOT_FOUND'
}
Node.js v20.13.1
加了,,,然后输出变这样
可以在index.mjs的开头加上这两句看看输出
console.log(import.meta); console.log(process.env);
等下,你用的是什么环境运行的命令行?这个是MINGW吗
试试用cmd或者powershell来运行node index.mjs呢
然后忘了说了,试试把开头的三行import都注释掉看看?然后还有看一下 dir 的输出
拿Python试着搞了一下, 请检查一下 (貌似是能动了 用的Gpt-4o 因为我在官网摁f12它Model是这个(我没订阅
Initializing session...
Working path: D:\PycharmProjects\TEST_1\Temp_UChatProxy\headless_profile
{"subscriptions":[],"freemium":{"max_calls":5,"used_calls":5}}
Session has no valid subscription
YouChat proxy listening on port 8080
Proxy is currently running with no authentication
API Format: Anthropic; Custom mode: disabled
======== Running on http://0.0.0.0:8080 ========
(Press CTRL+C to quit)
Message length: 1
trace_id: e52f7dca-40db-460b-990f-e72344be7b98
Using model gpt-4o
notice: 8051d354-3b18-4c7d-99c6-b95db45e15b2
Building req_body
#### You've hit your free quota for the Model Assistant. For more usage of the Model Assistant, learn more at: https://you.com/plans.
Answering your question without the Model Assistant:
I, access I answer you!
Code:
import asyncio
import datetime
import json
import os
import random
import time
import urllib.parse
import uuid
from io import BytesIO
from aiohttp import web
from docx import Document
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
# Model mapping
MODEL_MAPPING = {
"claude-3-5-sonnet-20240620": "claude_3_5_sonnet",
"claude-3-20240229": "claude_3_opus",
"claude-3-sonnet-20240229": "claude_3_sonnet",
"claude-3-haiku-20240307": "claude_3_haiku",
"claude-2.1": "claude_2",
"claude-2.0": "claude_2",
}
# Load configuration
try:
with open('config.json', 'r') as f:
config = json.load(f)
except Exception as e:
print(f"Failed to load config.json: {str(e)}")
exit(1)
def setup_chrome():
chrome_options = Options()
chrome_options.add_argument("--no-sandbox")
chrome_options.add_argument("--no-default-browser-check")
chrome_options.add_argument("--no-first-run")
chrome_options.add_argument("--no-restore-state")
chrome_options.add_argument("--disable-gpu")
chrome_options.add_argument("--disable-blink-features=AutomationControlled")
chrome_options.add_experimental_option("excludeSwitches", ["enable-automation"])
chrome_options.add_experimental_option('useAutomationExtension', False)
chrome_options.binary_location = r'D:\Chrome_v127.0.6510.4_Win64\chrome.exe'
work_dir = os.path.dirname(os.path.abspath(__file__))
profile_path = os.path.join(work_dir, 'headless_profile')
print(f'Working path: {profile_path}')
chrome_options.add_argument(f"--user-data-dir={profile_path}")
service = Service(executable_path=r'D:\ChromeDriver_v127.0.6510.4_Win64\chromedriver.exe')
driver = webdriver.Chrome(service=service, options=chrome_options)
return driver
def random_wait(min_seconds, max_seconds):
"""Wait for a random amount of time"""
time.sleep(random.uniform(min_seconds, max_seconds))
async def create_docx(content):
doc = Document()
for line in content.split('\n'):
doc.add_paragraph(line)
buffer = BytesIO()
doc.save(buffer)
buffer.seek(0)
return buffer.getvalue()
async def init_session(config):
print("Initializing session...")
driver = setup_chrome()
try:
# Set cookies
driver.get("https://you.com")
for cookie in config['sessions'][0]['cookies']:
driver.add_cookie(cookie)
# Validate session
random_wait(0.125, 0.25)
driver.get("https://you.com")
random_wait(1.5, 3)
driver.get("https://you.com")
random_wait(0.125, 0.25)
url = 'https://you.com/api/user/getYouProState'
driver.get(url)
WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.TAG_NAME, "pre")))
content = driver.find_element(By.TAG_NAME, "pre")
print(content.text)
json_content = json.loads(content.text)
if json_content.get('subscriptions'):
print("Session is valid")
return {'driver': driver, 'valid': True}
else:
print("Session has no valid subscription")
return {'driver': driver, 'valid': True}
# return None
except Exception as e:
print(f"Failed to initialize session: {str(e)}")
return None
async def handle_chat(request):
try:
body = await request.json()
if 'system' in body:
body['messages'].insert(0, {"role": "system", "content": body['system']})
print(f"Message length: {len(body['messages'])}")
trace_id = str(uuid.uuid4())
print(f"trace_id: {trace_id}")
# Select model
proxy_model = os.environ.get('AI_MODEL') or MODEL_MAPPING.get(body.get('model'), "gpt-4o")
print(f"Using model {proxy_model}")
# Create and upload DOCX file
previous_messages = "\n\n".join([msg['content'] for msg in body['messages']])
# docx_content = await create_docx(previous_messages)
docx_content = "undefined"
# Upload file
nonce = session['driver'].execute_script(
"return await fetch('https://you.com/api/get_nonce').then(res => res.text())")
print(f"notice: {nonce}")
upload_script = """
var blob = new Blob([new Uint8Array(arguments[0])], {type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'});
var form_data = new FormData();
form_data.append('file', blob, 'messages.docx');
return await fetch('https://you.com/api/upload', {
method: 'POST',
headers: {'X-Upload-Nonce': arguments[1]},
body: form_data
}).then(res => res.json());
"""
uploaded_file = session['driver'].execute_script(upload_script, list(docx_content), nonce)
if not uploaded_file or 'error' in uploaded_file:
raise Exception("Failed to upload file")
# Build You.com API request
msg_id = str(uuid.uuid4())
_time = datetime.datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%S.%f')[:-3]
req_params = {
'page': '1',
'count': '10',
'safeSearch': 'Off',
'q': ' ',
'chatId': trace_id,
'traceId': f"{trace_id}|{msg_id}|{_time}Z",
'conversationTurnId': msg_id,
'selectedAiModel': proxy_model,
'selectedChatMode': 'custom',
'pastChatLength': '0',
'queryTraceId': trace_id,
'use_personalization_extraction': 'false',
'domain': 'youchat',
'responseFilter': 'WebPages,TimeZone,Computation,RelatedSearches',
'mkt': 'ja-JP',
'userFiles': json.dumps(
[{'user_filename': 'messages.docx', 'filename': uploaded_file['filename'], 'size': len(docx_content)}]),
'chat': '[]'
}
print(f"Building req_body")
url = f"https://you.com/api/streamingSearch?{urllib.parse.urlencode(req_params)}"
response = web.StreamResponse()
response.headers['Content-Type'] = 'text/event-stream'
await response.prepare(request)
async def send_event(event, data):
await response.write(f"event: {event}\ndata: {json.dumps(data)}\n\n".encode('utf-8'))
if body.get('stream'):
await send_event('message_start', {
'type': 'message_start',
'message': {
'id': trace_id,
'type': 'message',
'role': 'assistant',
'content': [],
'model': 'claude-3-opus-20240229',
'stop_reason': None,
'stop_sequence': None,
'usage': {'input_tokens': 8, 'output_tokens': 1}
}
})
await send_event('content_block_start',
{'type': 'content_block_start', 'index': 0, 'content_block': {'type': 'text', 'text': ''}})
await send_event('ping', {'type': 'ping'})
final_response = ""
script = f"""
var evtSource = new EventSource("{url}");
evtSource.addEventListener('youChatToken', function(event) {{
window.youChatToken = event.data;
}});
evtSource.addEventListener('done', function(event) {{
window.done = true;
}});
evtSource.onerror = function(error) {{
window.error = error;
}};
"""
session['driver'].execute_script(script)
while True:
you_chat_token = session['driver'].execute_script("return window.youChatToken;")
if you_chat_token:
you_chat_token_data = json.loads(you_chat_token)
print(you_chat_token_data['youChatToken'], end='', flush=True)
if body.get('stream'):
await send_event('content_block_delta', {
'type': 'content_block_delta',
'index': 0,
'delta': {'type': 'text_delta', 'text': you_chat_token_data['youChatToken']}
})
else:
final_response += you_chat_token_data['youChatToken']
session['driver'].execute_script("window.youChatToken = null;")
done = session['driver'].execute_script("return window.done;")
if done:
break
error = session['driver'].execute_script("return window.error;")
if error:
raise Exception(f"EventSource error: {error}")
await asyncio.sleep(0.1)
if body.get('stream'):
await send_event('content_block_stop', {'type': 'content_block_stop', 'index': 0})
await send_event('message_delta', {
'type': 'message_delta',
'delta': {'stop_reason': 'end_turn', 'stop_sequence': None},
'usage': {'output_tokens': 12}
})
await send_event('message_stop', {'type': 'message_stop'})
else:
await response.write(json.dumps({
'id': str(uuid.uuid4()),
'content': [{'text': final_response}],
'model': 'string',
'stop_reason': 'end_turn',
'stop_sequence': 'string',
'usage': {'input_tokens': 0, 'output_tokens': 0}
}).encode('utf-8'))
await response.write_eof()
return response
except Exception as e:
return web.json_response({"error": str(e)}, status=500)
if __name__ == '__main__':
port = int(os.environ.get('PORT', 8080))
valid_api_key = os.environ.get('PASSWORD')
# Initialize session
session = asyncio.run(init_session(config))
if not session:
print("Failed to initialize session. Exiting.")
exit(1)
app = web.Application()
app.router.add_post('/v1/messages', handle_chat)
print(f"YouChat proxy listening on port {port}")
if not valid_api_key:
print("Proxy is currently running with no authentication")
print(
f"API Format: Anthropic; Custom mode: {'enabled' if os.environ.get('USE_CUSTOM_MODE') == 'true' else 'disabled'}")
web.run_app(app, port=port)
测试:
$ curl -X POST http://127.0.0.1:8080/v1/messages -H "Content-Type: application/json" -H "x-api-key: APIKey" -d '{
"model": "claude-3-opus-20240229",
"messages": [
{
"role": "user",
"content": "Hello, how are you today?"
}
],
"stream": true
}'
event: message_start
data: {"type": "message_start", "message": {"id": "e52f7dca-40db-460b-990f-e72344be7b98", "type": "message", "role": "assistant", "content": [], "model": "claude-3-opus-20240229", "stop_reason": null, "stop_sequence": null, "usage": {"input_tokens": 8, "output_tokens": 1}}}
event: content_block_start
data: {"type": "content_block_start", "index": 0, "content_block": {"type": "text", "text": ""}}
event: ping
data: {"type": "ping"}
event: content_block_delta
data: {"type": "content_block_delta", "index": 0, "delta": {"type": "text_delta", "text": "#### You've hit your free quota for the Model Assistant. For more usage of the Model Assistant, learn more at: https://you.com/plans.\n\nAnswering your question without the Model Assistant:\n\n"}}
event: content_block_delta
data: {"type": "content_block_delta", "index": 0, "delta": {"type": "text_delta", "text": "I"}}
event: content_block_delta
data: {"type": "content_block_delta", "index": 0, "delta": {"type": "text_delta", "text": ","}}
event: content_block_delta
data: {"type": "content_block_delta", "index": 0, "delta": {"type": "text_delta", "text": " access"}}
event: content_block_delta
data: {"type": "content_block_delta", "index": 0, "delta": {"type": "text_delta", "text": " I"}}
event: content_block_delta
data: {"type": "content_block_delta", "index": 0, "delta": {"type": "text_delta", "text": " answer"}}
event: content_block_delta
data: {"type": "content_block_delta", "index": 0, "delta": {"type": "text_delta", "text": " you"}}
event: content_block_delta
data: {"type": "content_block_delta", "index": 0, "delta": {"type": "text_delta", "text": "!"}}
event: content_block_stop
data: {"type": "content_block_stop", "index": 0}
event: message_delta
data: {"type": "message_delta", "delta": {"stop_reason": "end_turn", "stop_sequence": null}, "usage": {"output_tokens": 12}}
event: message_stop
data: {"type": "message_stop"}
然后忘了说了,试试把开头的三行import都注释掉看看?然后还有看一下 dir 的输出
我看看
Command dir
:
D:\Github\YOUChat_Proxy>dir
Volume in drive D has no label.
Volume Serial Number is AAE4-5478
Directory of D:\Github\YOUChat_Proxy
25/06/2024 下午10:07 <DIR> .
25/06/2024 下午10:07 <DIR> ..
25/06/2024 下午10:00 108 .gitignore
25/06/2024 下午10:36 2,101 config.mjs
25/06/2024 下午10:00 42 docker-build.sh
25/06/2024 下午10:00 1,041 Dockerfile
25/06/2024 下午10:38 13,535 index.mjs
25/06/2024 下午10:00 443 package.json
25/06/2024 下午10:05 61,042 pnpm-lock.yaml
25/06/2024 下午10:00 11,243 provider.mjs
25/06/2024 下午10:00 1,033 README.md
25/06/2024 下午10:00 111 start.bat
25/06/2024 下午10:00 6,078 usage.md
25/06/2024 下午10:00 2,165 utils.mjs
12 File(s) 98,942 bytes
2 Dir(s) 449,150,558,208 bytes free
D:\Github\YOUChat_Proxy>
console.log xxx
D:\Github\YOUChat_Proxy>node index.mjs
[Object: null prototype] {
dirname: 'D:\\Github\\YOUChat_Proxy',
filename: 'D:\\Github\\YOUChat_Proxy\\index.mjs',
resolve: [Function: resolve],
url: 'file:///D:/Github/YOUChat_Proxy/index.mjs'
}
{
'!ExitCode': '00000000',
ALLUSERSPROFILE: 'C:\\ProgramData',
APPCODE_VM_OPTIONS: 'D:\\JetBrains\\PyCharm 2023.2.6\\jetbra_ja-netfilter\\vmoptions\\appcode.vmoptions',
APPDATA: 'C:\\Users\\NTUser\\AppData\\Roaming',
CLIENTNAME: 'YILINGMIAO-570Z',
CLION_VM_OPTIONS: 'D:\\JetBrains\\PyCharm 2023.2.6\\jetbra_ja-netfilter\\vmoptions\\clion.vmoptions',
COMMONPROGRAMFILES: 'C:\\Program Files\\Common Files',
COMPUTERNAME: 'VM-HUAWEI-0-301',
COMSPEC: 'C:\\Windows\\system32\\cmd.exe',
'CommonProgramFiles(x86)': 'C:\\Program Files (x86)\\Common Files',
CommonProgramW6432: 'C:\\Program Files\\Common Files',
DATAGRIP_VM_OPTIONS: 'D:\\JetBrains\\PyCharm 2023.2.6\\jetbra_ja-netfilter\\vmoptions\\datagrip.vmoptions',
DATASPELL_VM_OPTIONS: 'D:\\JetBrains\\PyCharm 2023.2.6\\jetbra_ja-netfilter\\vmoptions\\dataspell.vmoptions',
DEVECOSTUDIO_VM_OPTIONS: 'D:\\JetBrains\\PyCharm 2023.2.6\\jetbra_ja-netfilter\\vmoptions\\devecostudio.vmoptions',
DriverData: 'C:\\Windows\\System32\\Drivers\\DriverData',
GATEWAY_VM_OPTIONS: 'D:\\JetBrains\\PyCharm 2023.2.6\\jetbra_ja-netfilter\\vmoptions\\gateway.vmoptions',
GOLAND_VM_OPTIONS: 'D:\\JetBrains\\PyCharm 2023.2.6\\jetbra_ja-netfilter\\vmoptions\\goland.vmoptions',
HOME: 'C:\\Users\\NTUser',
HOMEDRIVE: 'C:',
HOMEPATH: '\\Users\\NTUser',
IDEA_VM_OPTIONS: 'D:\\JetBrains\\PyCharm 2023.2.6\\jetbra_ja-netfilter\\vmoptions\\idea.vmoptions',
JAVA_HOME: 'C:\\Program Files\\Amazon Corretto\\jdk17.0.11_9',
JETBRAINSCLIENT_VM_OPTIONS: 'D:\\JetBrains\\PyCharm 2023.2.6\\jetbra_ja-netfilter\\vmoptions\\jetbrainsclient.vmoptions',
JETBRAINS_CLIENT_VM_OPTIONS: 'D:\\JetBrains\\PyCharm 2023.2.6\\jetbra_ja-netfilter\\vmoptions\\jetbrains_client.vmoptions',
LOCALAPPDATA: 'C:\\Users\\NTUser\\AppData\\Local',
LOGONSERVER: '\\\\VM-HUAWEI-0-301',
MAVEN_HOME: 'D:\\fuck-apache-maven-3.9.7-bin',
NUMBER_OF_PROCESSORS: '24',
OLDPWD: 'D:/Github',
OS: 'Windows_NT',
OneDrive: 'C:\\Users\\NTUser\\OneDrive',
PATH: 'C:\\Program Files\\Amazon Corretto\\jdk17.0.11_9\\bin;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0;C:\\Windows\\System32\\OpenSSH;C:\\Program Files\\nodejs;C:\\Program Files (x86)\\gnupg\\bin;C:\\Program Files\\Microsoft VS Code Insiders\\bin;C:\\Program Files\\Git\\cmd;C:\\Program Files\\Git\\mingw64\\bin;C:\\Program Files\\Git\\usr\\bin;C:\\Program Files (x86)\\Windows Kits\\10\\Windows Performance Toolkit;C:\\Program Files\\dotnet;C:\\Program Files\\WireGuard;C:\\Program Files (x86)\\GnuPG\\bin;C:\\Program Files (x86)\\NetSarang\\Xshell 8;C:\\Program Files\\Cloudflare\\Cloudflare WARP;D:\\fuck-apache-maven-3.9.7-bin\\bin;C:\\ProgramData\\miniconda3;C:\\ProgramData\\miniconda3\\Scripts;C:\\Users\\NTUser\\AppData\\Roaming\\npm;C:\\Users\\NTUser\\AppData\\Local\\GitHubDesktop\\bin;C:\\Users\\NTUser\\AppData\\Local\\Microsoft\\WindowsApps;C:\\users\\ntuser\\.local\\bin',
PATHEXT: '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC',
PHPSTORM_VM_OPTIONS: 'D:\\JetBrains\\PyCharm 2023.2.6\\jetbra_ja-netfilter\\vmoptions\\phpstorm.vmoptions',
PROCESSOR_ARCHITECTURE: 'AMD64',
PROCESSOR_IDENTIFIER: 'Intel64 Family 6 Model 79 Stepping 1, GenuineIntel',
PROCESSOR_LEVEL: '6',
PROCESSOR_REVISION: '4f01',
PROGRAMFILES: 'C:\\Program Files',
PROMPT: '$P$G',
PS1: '\\[\\033]0;$TITLEPREFIX:$PWD\\007\\]\\n\\[\\033[32m\\]\\u@\\h \\[\\033[35m\\]$MSYSTEM \\[\\033[33m\\]\\w\\[\\033[36m\\]`__git_ps1`\\[\\033[0m\\]\\n$ ',
PSModulePath: 'C:\\Program Files\\WindowsPowerShell\\Modules;C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules',
PUBLIC: 'C:\\Users\\Public',
PWD: 'D:/Github/YOUChat_Proxy',
PYCHARM_VM_OPTIONS: 'D:\\JetBrains\\PyCharm 2023.2.6\\jetbra_ja-netfilter\\vmoptions\\pycharm.vmoptions',
ProgramData: 'C:\\ProgramData',
'ProgramFiles(x86)': 'C:\\Program Files (x86)',
ProgramW6432: 'C:\\Program Files',
RIDER_VM_OPTIONS: 'D:\\JetBrains\\PyCharm 2023.2.6\\jetbra_ja-netfilter\\vmoptions\\rider.vmoptions',
RUBYMINE_VM_OPTIONS: 'D:\\JetBrains\\PyCharm 2023.2.6\\jetbra_ja-netfilter\\vmoptions\\rubymine.vmoptions',
SESSIONNAME: 'RDP-Tcp#3',
SHLVL: '1',
STUDIO_VM_OPTIONS: 'D:\\JetBrains\\PyCharm 2023.2.6\\jetbra_ja-netfilter\\vmoptions\\studio.vmoptions',
SYSTEMDRIVE: 'C:',
SYSTEMROOT: 'C:\\Windows',
TEMP: 'C:\\Users\\NTUser\\AppData\\Local\\Temp',
TERM: 'xterm-256color',
TMP: 'C:\\Users\\NTUser\\AppData\\Local\\Temp',
USERDOMAIN: 'VM-HUAWEI-0-301',
USERDOMAIN_ROAMINGPROFILE: 'VM-HUAWEI-0-301',
USERNAME: 'luanyao',
USERPROFILE: 'C:\\Users\\NTUser',
WEBIDE_VM_OPTIONS: 'D:\\JetBrains\\PyCharm 2023.2.6\\jetbra_ja-netfilter\\vmoptions\\webide.vmoptions',
WEBSTORM_VM_OPTIONS: 'D:\\JetBrains\\PyCharm 2023.2.6\\jetbra_ja-netfilter\\vmoptions\\webstorm.vmoptions',
WINDIR: 'C:\\Windows',
_: 'C:/Windows/system32/Conhost'
}
D:\Github\YOUChat_Proxy>
从dir输出结果来看都没有node_modules目录,好像是npm i没有安装上。另外这个python看起来没啥问题,不过我也不熟悉python。
补上安装了,
装上了,报错貌似霉变化
node:internal/modules/esm/resolve:854
throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base), null);
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'cookie' imported from D:\Github\YOUChat_Proxy\utils.mjs
at packageResolve (node:internal/modules/esm/resolve:854:9)
at moduleResolve (node:internal/modules/esm/resolve:927:18)
at defaultResolve (node:internal/modules/esm/resolve:1157:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:383:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:352:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:227:38)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:87:39)
at link (node:internal/modules/esm/module_job:86:36) {
code: 'ERR_MODULE_NOT_FOUND'
}
Node.js v20.13.1
我之前package.json里的依赖没写全。你重新pull下代码然后再npm install一下
能进到监听port8080了 (ck校验怎么好像炸了
本项目依赖Chrome浏览器,请勿关闭弹出的浏览器窗口。如果出现错误请检查是否已安装Chrome浏览器。
解析第0个cookie失败
已添加 0 个 cookie,开始验证有效性(是否有订阅)
验证完毕,有效cookie数量 0
YouChat proxy listening on port 8080
Proxy is currently running with no authentication
Custom mode: disabled
Handling request of Anthropic format
message length:1
Using session undefined
Using model gpt_4o
Error: 用户 undefined 的会话无效
at YouProvider.getCompletion (file:///D:/Github/YOUChat_Proxy/provider.mjs:101:10)
at IncomingMessage.<anonymous> (file:///D:/Github/YOUChat_Proxy/index.mjs:287:5)
at IncomingMessage.emit (node:events:519:28)
at endReadableNT (node:internal/streams/readable:1696:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
你cookie复制有问题,看教程重新去复制一个就行。
刚开始用的 pnpm i , 报错 以为是pnpm包管理器问题,删
node_modules
重新 npm i报错依旧
是我Node版本问题还是?