Ω
Send scenarios to /api/decision — see the full analysis.
| 1 | import { OmegaEngine, type JudgmentResult } from "@omega/sdk"; |
| 2 | |
| 3 | const omega = new OmegaEngine("YOUR_API_KEY_HERE"); |
| 4 | |
| 5 | const result: JudgmentResult = await omega.judge({ |
| 6 | "scenario": "I'm thinking about quitting my job to start a business.", |
| 7 | "context": "I have 6 months of savings and no dependents.", |
| 8 | "domain": "LIFE", |
| 9 | "riskTolerance": "MEDIUM", |
| 10 | "mode": "DECISION", |
| 11 | "explain": true |
| 12 | }); |
| 13 | |
| 14 | if (result.decision === "BLOCK") { |
| 15 | throw new Error(`Action blocked: ${result.reason}`); |
| 16 | } |