最新资讯
reddit.com OpenAI 称 Astra 仅满足 10% 安全任务标准 dev.to FreeToken:在自有 GPU 上运行前沿 MoE 模型及其内存需求 dev.to 当 AI Agent 说“完成”时,究竟完成了什么? dev.to 部署 Underdog Bark 3.0 Pro:逐字转写、自定义后端与分块设置 dev.to 为艰难对话构建 AI:五个 Agent、一条安全正则与一位盲评监督者 techcrunch.com Palo Alto Networks 洽谈以 5 亿美元收购 AI Agent 安全初创公司 Clutch theinformation.com 黄仁勋被要求就涉华间谍指控向国会作简报 www.infoq.com Edera 推出 Object Capability Bounded Authority,试图将凭证与 AI Agent 工作负载隔离 wechat 这波杀疯了!旗舰级模型不限量、1个月视频额度免费领 bloomberg.com AI 抛售蔓延至信用市场,软银领跌亚洲美元债 dev.to 如何在专用 GPU 服务器上用 OpenAI 兼容 API 部署 LLM dev.to 审计 153 份 Claude Code 与 Codex 会话记录:User-Agent 与 URL 中的邮箱泄露
多元动态
登录 注册
大模型 dev.to · @Ram Chandra Giri

我从教育科技平台中抽离并开源了 3 个小型 Node 工具

原文 我的收藏

作者在构建尼泊尔 NEB 课程备考平台 MCQplex 时,将三块与考试业务无关的基础设施抽成独立开源包。llm-free-cascade 把 Gemini、Groq、Cerebras 等免费额度 LLM API 级联起来,在多个 key 间自动轮换,并对结构性故障的 provider 设置冷却,零依赖;pdf-render-pool 则针对 Puppeteer 每次新建 headless Chromium 约 1-2 秒、约 200MB 内存的开销做进程池化。文章为个人项目介绍,未给出基准测试或使用数据。

AI推荐理由 开发者从尼泊尔 NEB 备考平台 MCQplex 中抽离并开源三个 Node 工具,其中 llm-free-cascade 将 Gemini、Groq、Cerebras 等免费额度 LLM API 做级联故障转移与多 key 轮换,并支持对结构性故障的 provider 冷却,零依赖;pdf-render-pool 针对 Puppeteer 每次启动 headless Chromium 的 1-2 秒与约 200MB 内存开销做池化。属具体可复用的工程实现,但为个人项目,未提供性能基准或采用情况。

66

正文

I've spent the last while building MCQplex, an exam-prep platform for Nepal's NEB curriculum. Along the way I built a few pieces of infrastructure that had nothing to do with exams specifically, so I pulled them out into their own packages: llm-free-cascade Free-tier LLM APIs (Gemini, Groq, Cerebras, and others) are individually rate-limited, but between them they add up to a lot of free inference if you just fail over from one to the next. This cascades a chat completion across however many you've got keys for, with automatic multi-key rotation (if you've made more than one free account on a provider) and cooldown for a provider that's structurally broken. Zero dependencies. const { LLMCascade } = require('llm-free-cascade'); const cascade = LLMCascade.fromEnv(); const { text, provider } = await cascade.generate({ system, user }); Enter fullscreen mode Exit fullscreen mode pdf-render-pool Launching a fresh headless Chromium per PDF (the naive way to use Puppeteer) costs 1-2 seconds and ~200MB of RAM every time. This keeps one browser warm and gives each render its own page, with a concurrency cap so a burst of PDF requests queues instead of taking the server down. mongo-job-lock If you run node-cron jobs on more than one instance (PM2 cluster, several servers), every instance fires the job unless you do something about it. This is a tiny MongoDB-backed advisory lock — steal-on-expiry, so a crashed holder can't deadlock the job forever — for whatever Mongo connection you already have. All three: zero or optional-peer dependencies, MIT licensed, tested, on npm. Feedback / PRs welcome, especially on llm-free-cascade since free-tier model names drift constantly and providers.json is set up so a one-file PR fixes a stale one.

来源报道 · 1 篇 · 以下链接均前往原始媒体

← 返回精选动态 原文

更多内容