Files
hack/tools/scripts/llm-key-hunter/results/_cache/content/chofuhoyu_ocs-tiku.json
T

1 line
28 KiB
JSON

{"repo": "chofuhoyu/ocs-tiku", "files": {"README.md": {"e33ba57d618c68875dbe37a9ef9c3d5958d5c1ee": {"t": 1785746385.4511788, "n": 2221, "h": "43aaccb04fa03b02", "c": "# OCS网课助手之AI自动刷题\n\n使用[OCS](https://docs.ocsjs.com/docs/quickly-start)刷课时有些课程题目较多且没有现成题库,本项目通过调用 DeepSeek API 实现 AI 自动答题,解放劳动力。\n\n## 环境要求\n\n- 安装 [OCS](https://docs.ocsjs.com/docs/quickly-start) 脚本\n- Python 3.10+\n- DeepSeek API Key(在 [platform.deepseek.com](https://platform.deepseek.com) 获取,余额不少于 10 元即可使用)\n\n## 使用方法\n\n克隆本项目并配置环境\n\n```bash\ngit clone git@github.com:Guo-Chenxu/ocs-tiku.git\ncd ocs-tiku\n\nuv sync\n```\n\n配置 DeepSeek API Key,编辑 `.env` 文件,填写你的 API Key 和模型:\n\n```bash\nDEEPSEEK_API_URL=https://api.deepseek.com/v1/chat/completions\nDEEPSEEK_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxx\nDEEPSEEK_MODEL_ID=deepseek-v4-pro\n```\n\n启动后端\n\n```bash\npython app.py\n```\n\n参数:\n\n- `--guess`:虽然有 prompt 限制,但是并不能保证大模型的输出一定是输入的 options 中的一个,开启此参数会判断输出是否合法,如果非法则随机选一个答案(此方法旨在赌正确率大于 60% 以过任务点,仍然可能会存在无法通过任务点需要手动复核的情况,只是降低了概率)\n- `--cache`:开启缓存,将每道题结果缓存到本地,下次请求相同题目时直接返回缓存结果,避免重复调用 API(蒙的答案不会缓存)\n\n```bash\n# 推荐用法:同时开启 guess 和 cache\npython app.py --guess --cache\n```\n\n如果一切正常,服务会启动在 9999 端口,接下来在 OCS 中进行配置。\n\n打开 OCS 页面,\"通用\" -> \"全局设置\" -> \"题库配置\"\n\n![](./assets/config.png)\n\n在\"题库配置\"中添加如下格式的 JSON 配置,保存配置即可。\n\n```json\n[\n {\n \"name\": \"TikuAdapter题库\",\n \"url\": \"http://127.0.0.1:9999/api/search\",\n \"homepage\": \"https://github.com/Guo-Chenxu/ocs-tiku\",\n \"method\": \"post\",\n \"type\": \"GM_xmlhttpRequest\",\n \"contentType\": \"json\",\n \"headers\": {},\n \"data\": {\n \"question\": \"${title}\",\n \"type\": \"${type}\",\n \"options\": {\n \"handler\": \"return (env)=>env.options?.split('\\\\n').map(s=>s.replace(/\\\\u00a0/g,' ').trim()).filter(s => s && !/^[A-F]\\\\.?$/.test(s))\"\n }\n },\n \"handler\": \"return (res)=>res.answer.allAnswer.map(i=>([res.question,i.join('#')]))\"\n }\n]\n```\n\n> [!NOTE]\n> 如果 OCS 脚本和后端运行在同一台电脑上,直接使用 `http://127.0.0.1:9999/api/search` 即可,无需公网地址。如果 OCS 脚本运行在其他电脑上,需要将 url 改为后端所在机器的局域网 IP(如 `http://192.168.x.x:9999/api/search`)或公网地址。\n\n> [!WARNING]\n> 目前仅支持单选和判断两种题型,其他题型能否正常运行为未知状态(多半不行)。\n\n## 模型说明\n\n在 `.env` 文件中通过 `DEEPSEEK_MODEL_ID` 配置模型。推荐使用 `deepseek-v4-pro` 兼顾精度与速度,低延迟场景可用 `deepseek-v4-flash`,高精度场景可用 `deepseek-reasoner`。\n\n## 致谢\n\n- [OCS](https://docs.ocsjs.com/docs/quickly-start)\n- [tikuAdapter](https://github.com/DokiDoki1103/tikuAdapter)\n"}, "ffef0ee9391ba7611d8b28fe903608654375965f": {"t": 1785763184.0399776, "n": 2221, "h": "43aaccb04fa03b02", "c": "# OCS网课助手之AI自动刷题\n\n使用[OCS](https://docs.ocsjs.com/docs/quickly-start)刷课时有些课程题目较多且没有现成题库,本项目通过调用 DeepSeek API 实现 AI 自动答题,解放劳动力。\n\n## 环境要求\n\n- 安装 [OCS](https://docs.ocsjs.com/docs/quickly-start) 脚本\n- Python 3.10+\n- DeepSeek API Key(在 [platform.deepseek.com](https://platform.deepseek.com) 获取,余额不少于 10 元即可使用)\n\n## 使用方法\n\n克隆本项目并配置环境\n\n```bash\ngit clone git@github.com:Guo-Chenxu/ocs-tiku.git\ncd ocs-tiku\n\nuv sync\n```\n\n配置 DeepSeek API Key,编辑 `.env` 文件,填写你的 API Key 和模型:\n\n```bash\nDEEPSEEK_API_URL=https://api.deepseek.com/v1/chat/completions\nDEEPSEEK_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxx\nDEEPSEEK_MODEL_ID=deepseek-v4-pro\n```\n\n启动后端\n\n```bash\npython app.py\n```\n\n参数:\n\n- `--guess`:虽然有 prompt 限制,但是并不能保证大模型的输出一定是输入的 options 中的一个,开启此参数会判断输出是否合法,如果非法则随机选一个答案(此方法旨在赌正确率大于 60% 以过任务点,仍然可能会存在无法通过任务点需要手动复核的情况,只是降低了概率)\n- `--cache`:开启缓存,将每道题结果缓存到本地,下次请求相同题目时直接返回缓存结果,避免重复调用 API(蒙的答案不会缓存)\n\n```bash\n# 推荐用法:同时开启 guess 和 cache\npython app.py --guess --cache\n```\n\n如果一切正常,服务会启动在 9999 端口,接下来在 OCS 中进行配置。\n\n打开 OCS 页面,\"通用\" -> \"全局设置\" -> \"题库配置\"\n\n![](./assets/config.png)\n\n在\"题库配置\"中添加如下格式的 JSON 配置,保存配置即可。\n\n```json\n[\n {\n \"name\": \"TikuAdapter题库\",\n \"url\": \"http://127.0.0.1:9999/api/search\",\n \"homepage\": \"https://github.com/Guo-Chenxu/ocs-tiku\",\n \"method\": \"post\",\n \"type\": \"GM_xmlhttpRequest\",\n \"contentType\": \"json\",\n \"headers\": {},\n \"data\": {\n \"question\": \"${title}\",\n \"type\": \"${type}\",\n \"options\": {\n \"handler\": \"return (env)=>env.options?.split('\\\\n').map(s=>s.replace(/\\\\u00a0/g,' ').trim()).filter(s => s && !/^[A-F]\\\\.?$/.test(s))\"\n }\n },\n \"handler\": \"return (res)=>res.answer.allAnswer.map(i=>([res.question,i.join('#')]))\"\n }\n]\n```\n\n> [!NOTE]\n> 如果 OCS 脚本和后端运行在同一台电脑上,直接使用 `http://127.0.0.1:9999/api/search` 即可,无需公网地址。如果 OCS 脚本运行在其他电脑上,需要将 url 改为后端所在机器的局域网 IP(如 `http://192.168.x.x:9999/api/search`)或公网地址。\n\n> [!WARNING]\n> 目前仅支持单选和判断两种题型,其他题型能否正常运行为未知状态(多半不行)。\n\n## 模型说明\n\n在 `.env` 文件中通过 `DEEPSEEK_MODEL_ID` 配置模型。推荐使用 `deepseek-v4-pro` 兼顾精度与速度,低延迟场景可用 `deepseek-v4-flash`,高精度场景可用 `deepseek-reasoner`。\n\n## 致谢\n\n- [OCS](https://docs.ocsjs.com/docs/quickly-start)\n- [tikuAdapter](https://github.com/DokiDoki1103/tikuAdapter)\n"}, "569f6b8fc15333c57bcdfbcb6480328dce1d3aa9": {"t": 1785763185.5730424, "n": 2194, "h": "af17418f811dbd2f", "c": "# OCS网课助手之AI自动刷题\n\n使用[OCS](https://docs.ocsjs.com/docs/quickly-start)刷课时有些课程题目较多且没有现成题库,本项目通过调用 DeepSeek API 实现 AI 自动答题,解放劳动力。\n\n## 环境要求\n\n- 安装 [OCS](https://docs.ocsjs.com/docs/quickly-start) 脚本\n- Python 3.10+\n- DeepSeek API Key(在 [platform.deepseek.com](https://platform.deepseek.com) 获取,余额不少于 10 元即可使用)\n\n## 使用方法\n\n克隆本项目并配置环境\n\n```bash\ngit clone git@github.com:Guo-Chenxu/ocs-tiku.git\ncd ocs-tiku\n\nuv sync\n```\n\n配置 DeepSeek API Key,编辑 `.env` 文件,填写你的 API Key 和模型:\n\n```bash\nDEEPSEEK_API_URL=https://api.deepseek.com/v1/chat/completions\nDEEPSEEK_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxx\nDEEPSEEK_MODEL_ID=deepseek-v4-pro\n```\n\n启动后端\n\n```bash\npython app.py\n```\n\n参数:\n\n- `--guess`:虽然有 prompt 限制,但是并不能保证大模型的输出一定是输入的 options 中的一个,开启此参数会判断输出是否合法,如果非法则随机选一个答案(此方法旨在赌正确率大于 60% 以过任务点,仍然可能会存在无法通过任务点需要手动复核的情况,只是降低了概率)\n- `--cache`:开启缓存,将每道题结果缓存到本地,下次请求相同题目时直接返回缓存结果,避免重复调用 API(蒙的答案不会缓存)\n\n```bash\n# 推荐用法:同时开启 guess 和 cache\npython app.py --guess --cache\n```\n\n如果一切正常,服务会启动在 9999 端口,接下来在 OCS 中进行配置。\n\n打开 OCS 页面,\"通用\" -> \"全局设置\" -> \"题库配置\"\n\n![](./assets/config.png)\n\n在\"题库配置\"中添加如下格式的 JSON 配置,保存配置即可。\n\n```json\n[\n {\n \"name\": \"TikuAdapter题库\",\n \"url\": \"http://127.0.0.1:9999/api/search\",\n \"homepage\": \"https://github.com/Guo-Chenxu/ocs-tiku\",\n \"method\": \"post\",\n \"type\": \"GM_xmlhttpRequest\",\n \"contentType\": \"json\",\n \"headers\": {},\n \"data\": {\n \"question\": \"${title}\",\n \"type\": \"${type}\",\n \"options\": {\n \"handler\": \"return (env)=>env.options?.split('\\\\n').filter(s => s.trim() && !/^[A-F]\\\\.?$/.test(s.trim()))\"\n }\n },\n \"handler\": \"return (res)=>res.answer.allAnswer.map(i=>([res.question,i.join('#')]))\"\n }\n]\n```\n\n> [!NOTE]\n> 如果 OCS 脚本和后端运行在同一台电脑上,直接使用 `http://127.0.0.1:9999/api/search` 即可,无需公网地址。如果 OCS 脚本运行在其他电脑上,需要将 url 改为后端所在机器的局域网 IP(如 `http://192.168.x.x:9999/api/search`)或公网地址。\n\n> [!WARNING]\n> 目前仅支持单选和判断两种题型,其他题型能否正常运行为未知状态(多半不行)。\n\n## 模型说明\n\n在 `.env` 文件中通过 `DEEPSEEK_MODEL_ID` 配置模型。推荐使用 `deepseek-v4-pro` 兼顾精度与速度,低延迟场景可用 `deepseek-v4-flash`,高精度场景可用 `deepseek-reasoner`。\n\n## 致谢\n\n- [OCS](https://docs.ocsjs.com/docs/quickly-start)\n- [tikuAdapter](https://github.com/DokiDoki1103/tikuAdapter)\n"}, "417d09c626af713f6b4151319775e7889a449420": {"t": 1785763187.0817597, "n": 2139, "h": "83612b0e2c3fefac", "c": "# OCS网课助手之AI自动刷题\n\n使用[OCS](https://docs.ocsjs.com/docs/quickly-start)刷课时有些课程题目较多且没有现成题库,本项目通过调用 DeepSeek API 实现 AI 自动答题,解放劳动力。\n\n## 环境要求\n\n- 安装 [OCS](https://docs.ocsjs.com/docs/quickly-start) 脚本\n- Python 3.10+\n- DeepSeek API Key(在 [platform.deepseek.com](https://platform.deepseek.com) 获取,余额不少于 10 元即可使用)\n\n## 使用方法\n\n克隆本项目并配置环境\n\n```bash\ngit clone git@github.com:Guo-Chenxu/ocs-tiku.git\ncd ocs-tiku\n\nuv sync\n```\n\n配置 DeepSeek API Key,编辑 `.env` 文件,填写你的 API Key 和模型:\n\n```bash\nDEEPSEEK_API_URL=https://api.deepseek.com/v1/chat/completions\nDEEPSEEK_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxx\nDEEPSEEK_MODEL_ID=deepseek-v4-pro\n```\n\n启动后端\n\n```bash\npython app.py\n```\n\n参数:\n\n- `--guess`:虽然有 prompt 限制,但是并不能保证大模型的输出一定是输入的 options 中的一个,开启此参数会判断输出是否合法,如果非法则随机选一个答案(此方法旨在赌正确率大于 60% 以过任务点,仍然可能会存在无法通过任务点需要手动复核的情况,只是降低了概率)\n- `--cache`:开启缓存,将每道题结果缓存到本地,下次请求相同题目时直接返回缓存结果,避免重复调用 API(蒙的答案不会缓存)\n\n```bash\n# 推荐用法:同时开启 guess 和 cache\npython app.py --guess --cache\n```\n\n如果一切正常,服务会启动在 9999 端口,接下来在 OCS 中进行配置。\n\n打开 OCS 页面,\"通用\" -> \"全局设置\" -> \"题库配置\"\n\n![](./assets/config.png)\n\n在\"题库配置\"中添加如下格式的 JSON 配置,保存配置即可。\n\n```json\n[\n {\n \"name\": \"TikuAdapter题库\",\n \"url\": \"http://127.0.0.1:9999/api/search\",\n \"homepage\": \"https://github.com/Guo-Chenxu/ocs-tiku\",\n \"method\": \"post\",\n \"type\": \"GM_xmlhttpRequest\",\n \"contentType\": \"json\",\n \"headers\": {},\n \"data\": {\n \"question\": \"${title}\",\n \"type\": \"${type}\",\n \"options\": {\n \"handler\": \"return (env)=>env.options?.split('\\\\n')\"\n }\n },\n \"handler\": \"return (res)=>res.answer.allAnswer.map(i=>([res.question,i.join('#')]))\"\n }\n]\n```\n\n> [!NOTE]\n> 如果 OCS 脚本和后端运行在同一台电脑上,直接使用 `http://127.0.0.1:9999/api/search` 即可,无需公网地址。如果 OCS 脚本运行在其他电脑上,需要将 url 改为后端所在机器的局域网 IP(如 `http://192.168.x.x:9999/api/search`)或公网地址。\n\n> [!WARNING]\n> 目前仅支持单选和判断两种题型,其他题型能否正常运行为未知状态(多半不行)。\n\n## 模型说明\n\n在 `.env` 文件中通过 `DEEPSEEK_MODEL_ID` 配置模型。推荐使用 `deepseek-v4-pro` 兼顾精度与速度,低延迟场景可用 `deepseek-v4-flash`,高精度场景可用 `deepseek-reasoner`。\n\n## 致谢\n\n- [OCS](https://docs.ocsjs.com/docs/quickly-start)\n- [tikuAdapter](https://github.com/DokiDoki1103/tikuAdapter)\n"}, "f8628fc83ec6a62f9eadb321dc74a7fb5304217e": {"t": 1785763188.6023517, "n": 2108, "h": "572cd07d361784df", "c": "# OCS网课助手之AI自动刷题\n\n使用[OCS](https://docs.ocsjs.com/docs/quickly-start)刷课时有些课程题目较多且没有现成题库,本项目通过调用 DeepSeek API 实现 AI 自动答题,解放劳动力。\n\n## 环境要求\n\n- 安装 [OCS](https://docs.ocsjs.com/docs/quickly-start) 脚本\n- Python 3.10+\n- DeepSeek API Key(在 [platform.deepseek.com](https://platform.deepseek.com) 获取,余额不少于 10 元即可使用)\n\n## 使用方法\n\n克隆本项目并配置环境\n\n```bash\ngit clone git@github.com:Guo-Chenxu/ocs-tiku.git\ncd ocs-tiku\n\nuv sync\n```\n\n配置 DeepSeek API Key,编辑 `.env` 文件,填写你的 API Key 和模型:\n\n```bash\nDEEPSEEK_API_URL=https://api.deepseek.com/v1/chat/completions\nDEEPSEEK_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxx\nDEEPSEEK_MODEL_ID=deepseek-v4-pro\n```\n\n启动后端\n\n```bash\npython app.py\n```\n\n参数:\n\n- `--guess`:虽然有 prompt 限制,但是并不能保证大模型的输出一定是输入的 options 中的一个,开启此参数会判断输出是否合法,如果非法则随机选一个答案(此方法旨在赌正确率大于 60% 以过任务点,仍然可能会存在无法通过任务点需要手动复核的情况,只是降低了概率)\n- `--cache`:开启缓存,将每道题结果缓存到本地,下次请求相同题目时直接返回缓存结果,避免重复调用 API(蒙的答案不会缓存)\n\n```bash\n# 推荐用法:同时开启 guess 和 cache\npython app.py --guess --cache\n```\n\n如果一切正常,服务会启动在 9999 端口,接下来在 OCS 中进行配置。\n\n打开 OCS 页面,\"通用\" -> \"全局设置\" -> \"题库配置\"\n\n![](./assets/config.png)\n\n在\"题库配置\"中添加如下格式的 JSON 配置,保存配置即可。\n\n```json\n[\n {\n \"name\": \"TikuAdapter题库\",\n \"url\": \"http://127.0.0.1:9999/api/search\",\n \"homepage\": \"https://github.com/Guo-Chenxu/ocs-tiku\",\n \"method\": \"post\",\n \"type\": \"GM_xmlhttpRequest\",\n \"contentType\": \"json\",\n \"headers\": {},\n \"data\": {\n \"question\": \"${title}\",\n \"options\": {\n \"handler\": \"return (env)=>env.options?.split('\\\\n')\"\n }\n },\n \"handler\": \"return (res)=>res.answer.allAnswer.map(i=>([res.question,i.join('#')]))\"\n }\n]\n```\n\n> [!NOTE]\n> 如果 OCS 脚本和后端运行在同一台电脑上,直接使用 `http://127.0.0.1:9999/api/search` 即可,无需公网地址。如果 OCS 脚本运行在其他电脑上,需要将 url 改为后端所在机器的局域网 IP(如 `http://192.168.x.x:9999/api/search`)或公网地址。\n\n> [!WARNING]\n> 目前仅支持单选和判断两种题型,其他题型能否正常运行为未知状态(多半不行)。\n\n## 模型说明\n\n在 `.env` 文件中通过 `DEEPSEEK_MODEL_ID` 配置模型。推荐使用 `deepseek-v4-pro` 兼顾精度与速度,低延迟场景可用 `deepseek-v4-flash`,高精度场景可用 `deepseek-reasoner`。\n\n## 致谢\n\n- [OCS](https://docs.ocsjs.com/docs/quickly-start)\n- [tikuAdapter](https://github.com/DokiDoki1103/tikuAdapter)\n"}, "166be1b90cb3af884187881e587346d9d63c3251": {"t": 1785763189.9382656, "n": 1591, "h": "a3f8add8fae5b031", "c": "# OCS网课助手之AI自动刷题\n\n使用[OCS](https://docs.ocsjs.com/docs/quickly-start)刷课时有些课程题目较多且没有现成题库,所以需要AI自动刷题,本项目为本地部署AI后端,免费刷题,解放劳动力。\n\n## 环境要求\n\n- 安装[OCS](https://docs.ocsjs.com/docs/quickly-start)脚本\n- 一个公网可以访问到的地址(ip/域名)\n- 一张可以足够运行大模型的显卡(实测,qwen3-4B可以在4090上运行,少数题目会出错,等全部刷完后再手动矫正即可)\n\n## 使用方法\n\n克隆本项目并配置环境\n\n```bash\ngit clone git@github.com:Guo-Chenxu/ocs-tiku.git\ncd ocs-tiku\n\nconda create -n ocs-tiku python=3.10\npip install -r requirements.txt\n```\n\n启动后端\n\n```bash\npython app.py\n```\n\n参数:\n\n- `--guess`:虽然有prompt限制,但是并不能保证大模型的输出一定是输入的options中的一个,使此参数会判断输出是否合法,如果非法则蒙一个答案(此方法旨在赌正确率大于60%以过任务点,仍然可能会存在无法通过任务点需要手动复核的情况,只是降低了概率)\n- `--cache`:开启缓存,将每道题结果缓存到本地,下次请求相同题目时直接返回缓存结果,避免重复计算(蒙的答案不会缓存)\n\n如果一切正常的话,现在服务应该正确启动在9999端口,并且成功加载模型,接下来是在ocs中进行配置。\n\n打开OCS页面,“通用”->“全局设置”->“题库配置”\n\n![](./assets/config.png)\n\n在“题库配置”中添加如下格式的json配置,其中url替换为你自己的公网地址,然后“保存配置”即可。\n\n```json\n[\n {\n \"name\": \"TikuAdapter题库\",\n \"url\": \"https://cxtiku.bupt-hpc.cn/api/search\", // 这里替换成你自己的公网地址\n \"homepage\": \"https://github.com/Guo-Chenxu/ocs-tiku\",\n \"method\": \"post\",\n \"type\": \"GM_xmlhttpRequest\",\n \"contentType\": \"json\",\n \"headers\": {},\n \"data\": {\n \"question\": \"${title}\",\n \"options\": {\n \"handler\": \"return (env)=>env.options?.split('\\\\n')\"\n }\n },\n \"handler\": \"return (res)=>res.answer.allAnswer.map(i=>([res.question,i.join('#')]))\"\n }\n]\n```\n\n> [!WARNING]\n> 目前作者的课程只有单选和判断两种题型,其他题型能否正常运行为未知状态(多半不行)\n\n## 致谢\n\n- [OCS](https://docs.ocsjs.com/docs/quickly-start)\n- [tikuAdapter](https://github.com/DokiDoki1103/tikuAdapter)\n\n"}, "8dce8ed372fc0dff8662cd8e8109695d86eee158": {"t": 1785763191.4803615, "n": 1382, "h": "16ab2d6a69c953e4", "c": "# OCS网课助手之AI自动刷题\n\n使用[OCS](https://docs.ocsjs.com/docs/quickly-start)刷课时有些课程题目较多且没有现成题库,所以需要AI自动刷题,本项目为本地部署AI后端,免费刷题,解放劳动力。\n\n## 环境要求\n\n- 安装[OCS](https://docs.ocsjs.com/docs/quickly-start)脚本\n- 一个公网可以访问到的地址(ip/域名)\n- 一张可以足够运行大模型的显卡(实测,qwen3-4B可以在4090上运行,少数题目会出错,等全部刷完后再手动矫正即可)\n\n## 使用方法\n\n克隆本项目并配置环境\n\n```bash\ngit clone git@github.com:Guo-Chenxu/ocs-tiku.git\ncd ocs-tiku\n\nconda create -n ocs-tiku python=3.10\npip install -r requirements.txt\n```\n\n启动后端\n\n```bash\npython app.py\n```\n\n如果一切正常的话,现在服务应该正确启动在9999端口,并且成功加载模型,接下来是在ocs中进行配置。\n\n打开OCS页面,“通用”->“全局设置”->“题库配置”\n\n![](./assets/config.png)\n\n在“题库配置”中添加如下格式的json配置,其中url替换为你自己的公网地址,然后“保存配置”即可。\n\n```json\n[\n {\n \"name\": \"TikuAdapter题库\",\n \"url\": \"https://cxtiku.bupt-hpc.cn/api/search\", // 这里替换成你自己的公网地址\n \"homepage\": \"https://github.com/Guo-Chenxu/ocs-tiku\",\n \"method\": \"post\",\n \"type\": \"GM_xmlhttpRequest\",\n \"contentType\": \"json\",\n \"headers\": {},\n \"data\": {\n \"question\": \"${title}\",\n \"options\": {\n \"handler\": \"return (env)=>env.options?.split('\\\\n')\"\n }\n },\n \"handler\": \"return (res)=>res.answer.allAnswer.map(i=>([res.question,i.join('#')]))\"\n }\n]\n```\n\n> [!WARNING]\n> 目前作者的课程只有单选和判断两种题型,其他题型能否正常运行为未知状态\n\n## 致谢\n\n- [OCS](https://docs.ocsjs.com/docs/quickly-start)\n- [tikuAdapter](https://github.com/DokiDoki1103/tikuAdapter)\n\n"}, "fa88223828213f3012130c0995864a1e10acfbea": {"t": 1785763192.7701197, "n": 1382, "h": "d11ec7b93b975b6d", "c": "# OCS网课助手之AI自动刷题\n\n使用[OCS](https://docs.ocsjs.com/docs/quickly-start)刷课时有些课程题目较多且没有现成题库,所以需要AI自动刷题,本项目为本地部署AI后端,免费刷题,解放劳动力。\n\n## 环境要求\n\n- 安装[OCS](https://docs.ocsjs.com/docs/quickly-start)脚本\n- 一个公网可以访问到的地址(ip/域名)\n- 一张可以足够运行大模型的显卡(实测,qwen3-4B可以在4090上运行,少数题目会出错,等全部刷完后再手动矫正即可)\n\n## 使用方法\n\n克隆本项目并配置环境\n\n```bash\ngit clone git@github.com:Guo-Chenxu/ocs-tiku.git\ncd ocs-tiku\n\nconda create -n ocs-tiku python=3.10\npip install -r requirements.txt\n```\n\n启动后端\n\n```bash\npython app.py\n```\n\n如果一切正常的话,现在服务应该正确启动在9999端口,并且成功加载模型,接下来是在ocs中进行配置。\n\n打开OCS页面,“通用”->“全局设置”->“题库配置”\n\n![](./assets/config.png)\n\n在“题库配置”中添加如下格式的json配置,其中url替换为你自己的公网地址,然后“保存配置”即可。\n\n```json\n[\n {\n \"name\": \"TikuAdapter题库\",\n \"url\": \"https://cxtiku.bupt-hpc.cn/api/search\", // 这里替换成你自己的公网地址\n \"homepage\": \"https://github.com/Guo-Chenxu/ocs-tiku\",\n \"method\": \"post\",\n \"type\": \"GM_xmlhttpRequest\",\n \"contentType\": \"json\",\n \"headers\": {},\n \"data\": {\n \"question\": \"${title}\",\n \"options\": {\n \"handler\": \"return (env)=>env.options?.split('\\\\n')\"\n }\n },\n \"handler\": \"return (res)=>res.answer.allAnswer.map(i=>([res.question,i.join('#')]))\"\n }\n]\n```\n\n> [!WARNING]\n> 目前作者的课程只有单选和判断两种题型,其他题型能否正常运行为未知状态\n\n## 致谢\n\n- [OCS](https://docs.ocsjs.com/docs/quickly-start)\n- [tikuAdapter](https://github.com/DokiDoki1103/tikuAdapter)\n\n"}, "1dc82dc118855eee671938f0a0b01c8f60376177": {"t": 1785763194.0557642, "n": 1332, "h": "a6f9943dc306d642", "c": "# OCS网课助手之AI自动刷题\n\n使用[OCS](https://docs.ocsjs.com/docs/quickly-start)刷课时有些课程题目较多且没有现成题库,所以需要AI自动刷题,本项目为本地部署AI后端,免费刷题,解放劳动力。\n\n## 环境要求\n\n- 安装[OCS](https://docs.ocsjs.com/docs/quickly-start)脚本\n- 一个公网可以访问到的地址(ip/域名)\n- 一张可以足够运行大模型的显卡(实测,qwen3-4B可以在4090上运行,少数题目会出错,等全部刷完后再手动矫正即可)\n\n## 使用方法\n\n克隆本项目并配置环境\n\n```bash\ngit clone git@github.com:Guo-Chenxu/ocs-tiku.git\ncd ocs-tiku\n\nconda create -n ocs-tiku python=3.10\npip install -r requirements.txt\n```\n\n启动后端\n\n```bash\npython app.py\n```\n\n如果一切正常的话,现在服务应该正确启动在9999端口,并且成功加载模型,接下来是在ocs中进行配置。\n\n打开OCS页面,“通用”->“全局设置”->“题库配置”\n\n![](./assets/config.png)\n\n在“题库配置”中添加如下格式的json配置,其中url替换为你自己的公网地址,然后“保存配置”即可。\n\n```json\n[\n {\n \"name\": \"TikuAdapter题库\",\n \"url\": \"https://cxtiku.bupt-hpc.cn/api/search\", // 这里替换成你自己的公网地址\n \"homepage\": \"https://github.com/Guo-Chenxu/ocs-tiku\",\n \"method\": \"post\",\n \"type\": \"GM_xmlhttpRequest\",\n \"contentType\": \"json\",\n \"headers\": {},\n \"data\": {\n \"question\": \"${title}\",\n \"options\": {\n \"handler\": \"return (env)=>env.options?.split('\\\\n')\"\n }\n },\n \"handler\": \"return (res)=>res.answer.allAnswer.map(i=>([res.question,i.join('#')]))\"\n }\n]\n```\n\n\n## 致谢\n\n- [OCS](https://docs.ocsjs.com/docs/quickly-start)\n- [tikuAdapter](https://github.com/DokiDoki1103/tikuAdapter)\n\n"}, "8463286727b279f4096d1e0754c4e98573735de5": {"t": 1785763195.403475, "n": 1333, "h": "36576c4a5351da40", "c": "# OCS网课助手之AI自动刷题\n\n使用[OCS](https://docs.ocsjs.com/docs/quickly-start)刷课时有些课程题目较多且没有现成题库,所以需要AI自动刷题,本项目为本地部署AI后端,免费刷题,解放劳动力。\n\n## 环境要求\n\n- 安装[OCS](https://docs.ocsjs.com/docs/quickly-start)脚本\n- 一个公网可以访问到的地址(ip/域名)\n- 一张可以足够运行大模型的显卡(实测,qwen3-4B可以在4090上运行,少数题目会出错,等全部刷完后再手动矫正即可)\n\n## 使用方法\n\n克隆本项目并配置环境\n\n```bash\ngit clone git@github.com:Guo-Chenxu/ocs-tiku.git\ncd ocs-tiku\n\nconda create -n ocs-tiku python=3.10\npip install -r requirements.txt\n```\n\n启动后端\n\n```bash\npython app.py\n```\n\n如果一切正常的话,现在服务应该正确启动在9999端口,并且成功加载模型,接下来是在ocs中进行配置。\n\n打开OCS页面,“通用”->“全局设置”->“题库配置”\n\n![](./assets/config1.png)\n\n在“题库配置”中添加如下格式的json配置,其中url替换为你自己的公网地址,然后“保存配置”即可。\n\n```json\n[\n {\n \"name\": \"TikuAdapter题库\",\n \"url\": \"https://cxtiku.bupt-hpc.cn/api/search\", // 这里替换成你自己的公网地址\n \"homepage\": \"https://github.com/Guo-Chenxu/ocs-tiku\",\n \"method\": \"post\",\n \"type\": \"GM_xmlhttpRequest\",\n \"contentType\": \"json\",\n \"headers\": {},\n \"data\": {\n \"question\": \"${title}\",\n \"options\": {\n \"handler\": \"return (env)=>env.options?.split('\\\\n')\"\n }\n },\n \"handler\": \"return (res)=>res.answer.allAnswer.map(i=>([res.question,i.join('#')]))\"\n }\n]\n```\n\n\n## 致谢\n\n- [OCS](https://docs.ocsjs.com/docs/quickly-start)\n- [tikuAdapter](https://github.com/DokiDoki1103/tikuAdapter)\n\n"}, "05825b85a5e2dee2fc06dc7d3da5d0ca3f53fc56": {"t": 1785763197.7569263, "n": 156, "h": "5f57dfa310b79bda", "c": "# OCS网课助手之AI自动刷题\n\n使用[OCS](https://docs.ocsjs.com/docs/quickly-start)刷课时有些课程题目较多且没有现成题库,所以需要AI自动刷题,本项目为本地部署AI后端,免费刷题,解放劳动力。\n\n## 使用方法\n\n克隆本项目并配置环境\n\n```bash\n```"}}}}