deathlegionteamlk/deathmode

GitHub: deathlegionteamlk/deathmode

一个单 HTML 文件的多模型聊天界面,专注于对 LLM 进行红队压力测试、模型竞速比较和 agent 代码执行。

Stars: 0 | Forks: 0

typing [![License: MIT](https://img.shields.io/badge/License-MIT-yellow?style=for-the-badge&logo=opensourceinitiative&logoColor=white)](LICENSE) [![Python](https://img.shields.io/badge/Python-3.12-3776AB?style=for-the-badge&logo=python&logoColor=white)](https://www.python.org) [![Tests](https://img.shields.io/badge/Tests-21%20passing-2ea44f?style=for-the-badge&logo=checkmarx&logoColor=white)](#running-tests) [![Models](https://img.shields.io/badge/Models-8%20verified-1E90FF?style=for-the-badge&logo=ollama&logoColor=white)](#verified-working-models) [![Single File](https://img.shields.io/badge/Single%20File-220KB-critical?style=for-the-badge&logo=html5&logoColor=white)](#quick-start) [![Maintainer](https://img.shields.io/badge/Death%20Legion%20Team-black?style=for-the-badge&logo=github&logoColor=39FF14)](https://deathlegion.netlify.app) deathmode racing four models in God Mode *录制你自己的运行过程并将其放在 `assets/deathmode-demo.gif` —— 放好后替换上面的路径。*
## 这究竟是什么 GitHub 上的每一个“AI 聊天 UI”仓库都是一样的:用 shadcn 模板包装 40 行 `fetch()` 代码,然后称之为一个产品。这不是那种东西。DEATHMODE 是一个单一的 HTML 文件,大约 220KB,没有 `npm install`,没有构建步骤,没有框架——在浏览器中打开它就能运行。它与 OpenRouter 通信,因此你只需登录一次就能使用八个模型,而不是八个 API 密钥和八个标签页。 它还做了大多数聊天 UI 假装不存在的事情:对你自己的 prompt 进行红队测试、让模型相互竞速,以及通过真实的工具调用运行 agent 循环,而不是只显示一个写着“思考中”的加载动画。 ## 五种模式,无需选择模型 你不需要选择模型。每次请求都会为你选择一个经过验证的模型,如果它受到速率限制、额度用尽或被地理封锁,应用程序会静默重试备用链中的下一个模型。你永远不会看到“模型不可用”的错误——你只会从那 8 个经过验证且实际可用的模型中获得答案。
God Mode racing models side by side
- **Single** —— 一个模型,一段对话,没有花里胡哨的东西 - **God Mode** —— 同时向每个模型发送相同的 prompt,观察哪个模型最先完成以及它们是否一致 - **Compare** —— 相同的想法,并排比较,没有计时 - **Red Team** —— 19 种混淆转换和 20 种越狱模板,用于测试系统 prompt 在压力下的表现 - **Agent** —— 一个 ReAct 风格的循环,包含 9 种工具:time, calc, web_search, web_fetch, text_extract, json_parse, code_run, js_eval, python_run ## Red Team 模式 这是让 DEATHMODE 有别于其他所有聊天包装器的地方。16 种越狱模板(DAN, Developer Mode, FreedomGPT, PAIR, Many-Shot 等)默认开启,直接注入到系统 prompt 中,因为如果你在测试 prompt 的鲁棒性,你会希望对抗场景默认开启,而不是埋藏在一个你会忘记其存在的设置菜单中。再加上 19 种混淆转换,你就有了一个不错的测试平台,用来探究模型或防护栏的实际行为,而不是营销页面上所说的行为。
Red Team mode running transforms against a prompt
这些工具是为那些测试自己系统以及他们有权测试的模型的人准备的。请在你拥有或被授权评估的对象上使用它。 ## Agent 模式
Agent mode timeline with tool calls
规划、行动、观察、重复。该 agent 在浏览器中获得了一个真实的 Python 解释器(Pyodide, WASM,无需服务器往返),通过 `new Function()` 获得了 JS 支持,并且如果你需要 Python 和 JS 无法做到的事情,它还能通过 Piston API 支持 75 多种其他语言。每次运行都会生成一个时间线,你可以向后滚动查看、从任意步骤重新运行、从中断的地方继续,或者导出整个轨迹。 ## The Humanizer 每个响应都会经过一个基于规则的步骤处理,剥离常见的 AI 痕迹——用一个破折号代替三个标点符号、“深入探索(网络/织锦等比喻)”、反射性的模糊处理、阿谀奉承的开场白。它不是一个神奇的反检测器。它只是一个清理步骤,这样模型听起来就不会像是在为发一篇 LinkedIn 帖子而试镜。 ## 快速开始 ``` # 直接打开它,确实就这么简单 open public/deathmode.html ``` ``` # 或者如果你的浏览器对本地文件访问比较挑剔,就 serve 它 python3 -m http.server 8080 --directory public # 然后访问 http://localhost:8080/deathmode.html ``` ``` # 或者 ship 它 python3 scripts/deploy_herenow.py ``` 无需 `npm install`。在你看到 UI 之前也无需摆弄 `.env`。打开文件,开始聊天。 ## API 密钥 内部预置了一个预先配置好的 OpenRouter 密钥,以便你可以直接冷启动试用。要使用你自己的密钥: 1. 在 [openrouter.ai/keys](https://openrouter.ai/keys) 获取一个 2. 打开设置(齿轮图标) 3. 将其粘贴进去——它会保留在 `localStorage` 中,除了访问 `openrouter.ai` 之外,永远不会离开你的浏览器 ## 验证可用的模型 以下八个模型均通过了针对预配置密钥的 2/2 可靠性检查。如果某个模型受到速率限制或失效,DEATHMODE 会静默回退到下一个模型——你无需费心照看。 | 模型 | 用途 | |---|---| | Llama 3.1 70B | 默认的主力模型 | | Llama 3.1 8B | 快速、便宜,对大多数事情来说都足够好 | | DeepSeek Chat | 通用对话 | | DeepSeek R1 | 回答前先进行推理 | | Mistral Large | 强大,不那么啰嗦 | | Amazon Nova Pro | Amazon 的顶配模型 | | Amazon Nova Lite | 中等层级,不错的折中选择 | | Amazon Nova Micro | 该系列中最快、最便宜的 | ## 主题 有六款主题。Terminal 是默认的——黑底荧光绿,因为对于功能列表中带有“红队”字眼的工具来说,这是唯一正确的配色方案。如果不喜欢黑底绿字,Midnight, Aurora, Blood, Brutal 和 Manifesto 可供你选择。
cycling through the six themes
## 项目结构 ``` deathmode/ ├── public/ │ └── deathmode.html # the whole app, one file, ~220KB ├── src/ │ ├── __init__.py # package metadata │ ├── core/ │ │ └── config.py # central config + state │ ├── models/ │ │ └── curated.py # verified model list + fallback chain │ ├── api/ │ │ └── openrouter.py # streaming client + fallback logic │ ├── agent/ │ │ └── agent.py # ReAct agent with planning │ ├── tools/ │ │ └── registry.py # tool registry │ ├── redteam/ │ │ └── transforms.py # 19 obfuscation transforms │ ├── humanizer/ │ │ └── humanizer.py # AI writing pattern remover │ ├── ui/ │ │ └── markdown.py # safe markdown → HTML │ ├── themes/ │ │ └── themes.py # 6 OKLCH theme definitions │ └── utils/ │ └── randomizers.py # model/transform picker ├── tests/ │ ├── test_humanizer.py │ ├── test_transforms.py │ └── test_models.py ├── scripts/ │ ├── deploy_herenow.py │ └── test_markdown.js ├── docs/ │ ├── ARCHITECTURE.md │ └── JAILBREAK_TEMPLATES.md ├── config/ │ └── default.toml ├── examples/ │ └── example_usage.py ├── assets/ │ └── logo.txt ├── LICENSE ├── README.md └── requirements.txt ``` ## 运行测试 ``` cd deathmode python3 tests/test_humanizer.py python3 tests/test_transforms.py python3 tests/test_models.py ``` 21 个测试,全部通过,据我们所知没有不稳定的测试。 ## 技术栈 一个内嵌了 CSS 和 JS 的单一 HTML 文件——没有打包工具,没有框架。字体使用的是来自 Google Fonts CDN 的 JetBrains Mono, Geist, Albert Sans 和 Instrument Serif。OpenRouter 负责模型路由和流式传输。代码执行方面,Python 使用 Pyodide,JS 使用 `new Function()`,其他所有语言使用 Piston。`src/` 下的 Python 部分用于测试、CLI 使用以及保持文档的诚实。 ## 许可证 MIT。详见 [LICENSE](LICENSE)。
标签:DLL 劫持, 人工智能, 后端开发, 大语言模型, 用户模式Hook绕过, 聊天界面