簡中網黃模擬器

第一步:揀你嘅身份設定。揀完先入故事 — 你係邊個,成個故事就點走。

先揀身份,再開始

唔好急住入故事。每位朋友開局都要先定身份:用預設一㩒搞掂,或者逐項自己揀、自己改名都得。身份會寫入狀態欄、開場白,同 AI 回應(有接 Key 嗰陣)。

開始之後,頂部會顯示你嘅身份卡;㩒「重新開始」可以返嚟改身份重玩。

接 AI 設定(方案 2 · DeepSeek)— 可選

呢頁本身係靜態網站,接唔到 Muse 本人(Muse 冇公開 API 俾網站接)。方案 2 係接 DeepSeek:平、回應快,玩法同你而家同 Muse 玩一模一樣。而家有兩個模式,㩒「測試連接」嗰陣會自動跟返你有冇貼 Key 嗰個模式嚟試:

模式 A · 伺服器代傳(冇貼 Key)頁面會 call 本站相對路徑 /api/chat 同 /api/balance,由 Cloudflare Pages Functions 代傳去 DeepSeek。條 Key 只放喺 Cloudflare 嗰邊嘅環境變數,唔會出現喺頁面、唔會俾朋友見到;朋友唔使貼 Key,全部用量計落站主條數。前提:呢頁要部署喺 Cloudflare Pages,而且已經加好 Functions 同環境變數(見下面「站主部署」)。未部署好嗰陣,呢個模式會測試失敗,再跌返內置引擎。
模式 B · 自己 Key 直連(有貼 Key)貼入你自己嘅 DeepSeek Key,頁面會照舊直接 call api.deepseek.com,用返你自己嘅額度。條 Key 只會留喺你部機今次開啟嘅記憶入面,關頁即清,唔會上傳去其他地方(只會直接 send 去 DeepSeek)。

而家模式:伺服器代傳(未貼 Key)

站主部署:Cloudflare Pages Functions(揀咗代傳先要睇)

朋友嗰邊咩都唔使做。站主部署嗰陣要做齊呢 3 步,條 Key 先會喺伺服器嗰邊生效,又唔會出現喺頁面度:

  1. 放 Functions 檔案 — 喺網站根目錄(同 index.html 同一層)加兩個檔案:functions/api/chat.js 同 functions/api/balance.js,內容用下面兩段。唔好將條 Key 寫入呢兩個檔案或者 index.html。
  2. 設定環境變數 — Cloudflare Dashboard → 你個 Pages 項目 → Settings → Environment variables → Production 加一條 DEEPSEEK_API_KEY,值係你自己條 DeepSeek Key,㩒 Encrypt/Secret。
  3. 重新部署 — 加完環境變數要 Redeploy 一次先生效。之後朋友開 pages.dev 網址,唔貼 Key 都會自動行代傳。留意:有條 link 嘅人就用到站主額度,記得去 DeepSeek 後台睇住餘額同用量。

functions/api/chat.js(POST /api/chat — 將頁面傳嚟嘅 body 原封轉去 DeepSeek chat completions)

export async function onRequestPost(context) {
  const apiKey = context.env.DEEPSEEK_API_KEY;
  if (!apiKey) {
    return new Response(JSON.stringify({ error: { message: "DEEPSEEK_API_KEY 未設定" } }), { status: 500, headers: { "Content-Type": "application/json" } });
  }
  const body = await context.request.text();
  const res = await fetch("https://api.deepseek.com/chat/completions", {
    method: "POST",
    headers: { "Content-Type": "application/json", "Authorization": "Bearer " + apiKey },
    body: body
  });
  return new Response(res.body, { status: res.status, headers: { "Content-Type": res.headers.get("Content-Type") || "application/json" } });
}

functions/api/balance.js(GET /api/balance — 用站主條 Key 查餘額)

export async function onRequestGet(context) {
  const apiKey = context.env.DEEPSEEK_API_KEY;
  if (!apiKey) {
    return new Response(JSON.stringify({ error: { message: "DEEPSEEK_API_KEY 未設定" } }), { status: 500, headers: { "Content-Type": "application/json" } });
  }
  const res = await fetch("https://api.deepseek.com/user/balance", {
    headers: { "Authorization": "Bearer " + apiKey }
  });
  return new Response(res.body, { status: res.status, headers: { "Content-Type": res.headers.get("Content-Type") || "application/json" } });
}
角色同世界(你今局嘅設定)

未揀身份之前,呢度會係空白。揀完身份開始之後,你嘅白天/夜晚身份、目標同性格路線會寫喺度,成局都跟住呢個設定走。㩒「改身份 / 重新開始」可以換另一個身份重玩。