Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I wanted `if` statements for fuzzy conditions, so I built askif

说明与用途

开发者创建了 askif,利用 Jev 模型实现模糊条件分支,简化代码并降低成本。

问题

Hard to express fuzzy conditions in code for branching logic, e.g., triaging support tickets for human agent requests.

结果

Reduced code complexity, improved maintainability, and achieved cost of ~$0.013 per 1,000 calls with ~250 ms latency.

工作流

  • Install askif and @askif/jev via npm. Set TYPESAFE_API_KEY. Use ask.if to evaluate a condition string and provide callbacks for then, else, and unsure. Optionally use ask.switch for multi‑choice routing. Optionally use ask.score for severity scoring. Handle the returned probability or boolean as needed.

证据

"askif" lets you branch on fuzzy judgments (ask.if, ask.switch, ask.score) with typed results.

来源

Cost: about $0.013 per 1,000 calls.

来源

Latency: 72 ms inference + 175 ms network ≈ 250 ms.

来源

Node 22+, server-side only. TypeSafe's SDK refuses to run in a browser, since it would expose your API key.

来源

  • 记录日期: 2026-10-01T21:56:01.866Z