cloudflare / cloudflare/ai-utils

Use Outlines from .txt to replace strictValidation

Open
#9 0 comments 1 reaction 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.