cloudflare / cloudflare/ai-utils
Use Outlines from .txt to replace strictValidation
- Dominant language
- TypeScript
- Stars
- 196
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/dottxt-ai/outlines
Essentially, why would you need a `strictValidation` parameter when you can literally enforce it?
Outlines enables exactly that! The output can be clearly defined with a JSON schema or Pydantic model, or even RegEx!
Running sentiment analysis and just want either 'Positive' or 'Negative'? Easy! Just create a tuple with the possible outputs.
Contributor guide
Research direction
Start by locating the strictValidation parameter and the output-validation entry points in the TypeScript repository. Review how the toolkit currently handles sentiment outputs, then determine whether JSON schemas, Pydantic models, regular expressions, and tuples can replace the parameter; done means the proposed constraints are supported and documented with tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, typescript
- Domain
- ai, backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100