mirror of
https://github.com/bitbaum/ai-forms.git
synced 2026-12-04 06:17:06 +01:00
The repo had nothing a visitor could run. Evaluating the library meant wiring a provider into your own app first, which is the wrong order — the behaviour has to be visible before anyone invests that. `examples/next` is a real job-posting form: prose fills it, follow-up instructions patch it. It runs with zero configuration because `complete` is caller-supplied, so the example ships a deterministic offline pattern matcher for the no-key case. That matcher is NOT a language model and the UI says so in plain words — it exists so the library's own contribution (merge intent, sanitizing, field discipline) is visible without a provider in the way. Set GROQ_API_KEY or OPENAI_API_KEY for real model behaviour. Verified end to end against the running example: - fill from one sentence -> 9 fields set, salary parsed as 130000-160000 - "make it principal" -> changed == ["seniority"], everything else survives - "set the posting id" -> postingId unchanged; it is aiExcluded - unknown target -> rejected before any model call Root package unaffected: 14/14 tests green. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
22 lines
563 B
JSON
22 lines
563 B
JSON
{
|
|
"compilerOptions": {
|
|
"target": "ES2022",
|
|
"lib": ["dom", "dom.iterable", "ES2022"],
|
|
"allowJs": false,
|
|
"skipLibCheck": true,
|
|
"strict": true,
|
|
"noEmit": true,
|
|
"esModuleInterop": true,
|
|
"module": "esnext",
|
|
"moduleResolution": "bundler",
|
|
"resolveJsonModule": true,
|
|
"isolatedModules": true,
|
|
"jsx": "preserve",
|
|
"incremental": true,
|
|
"plugins": [{ "name": "next" }],
|
|
"paths": { "@/*": ["./*"] }
|
|
},
|
|
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
|
"exclude": ["node_modules"]
|
|
}
|