petrukha-ivan/mlx-swift-structured

Structured output generation in Swift

51
/ 100
Established

This library helps Swift developers reliably get structured data, like JSON or specific text formats, from large language models (LLMs). It takes your desired data structure (defined by JSON Schema, regex, or EBNF) and an LLM's output, then ensures the generated text strictly adheres to that structure. Developers building Swift applications that use LLMs to extract or generate formatted information will find this useful.

Use this if you are a Swift developer working with LLMs and need their text output to strictly conform to a specific format, such as valid JSON, a predefined list, or a regex pattern.

Not ideal if you are not a Swift developer or if your application does not require strict formatting for LLM outputs.

Swift development LLM integration data extraction output formatting AI application development
No Package No Dependents
Maintenance 10 / 25
Adoption 8 / 25
Maturity 15 / 25
Community 18 / 25

How are scores calculated?

Stars

65

Forks

13

Language

Swift

License

Apache-2.0

Last pushed

Feb 13, 2026

Commits (30d)

0

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/llm-tools/petrukha-ivan/mlx-swift-structured"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.