json-schema-spec
torch-grammar
json-schema-spec | torch-grammar | |
---|---|---|
29 | 3 | |
3,219 | 63 | |
2.9% | - | |
7.9 | 5.2 | |
10 days ago | 21 days ago | |
JavaScript | Python | |
GNU General Public License v3.0 or later | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
json-schema-spec
-
TypeSpec: A New Language for API-Centric Development
Yep and that comes from JSON Schema: https://json-schema.org/
I believe recent versions of OpenAPI are "compatible" with JSON Schema (at least they "wanted to be" last I checked as I was implementing some schema converters).
Even TypeScript is not enough to represent all of JSON Schema! But it gets close (perhaps if you remove validation rules and stuff like that it's a full match).
But even something like Java can represent most of it pretty well, specially since sealed interfaces were added. I know because I've done it :).
- JSON Schema Blog
-
Deploy a simple data storage API with very little code using Amazon API Gateway and DynamoDB
models.tf where I centralized all the Data model that API Gateway uses to perform input and output checks. Those use the JSON-schema specification. GitHub - psantus/serverless.api-gateway-dynamodb-integration.terraform
- Unlocking the frontend – a call for standardizing component APIs pt.2
- JSON Schema
-
How to Automatically Consume RESTful APIs in Your Frontend
In the meantime, we are going to expand our backend with two endpoints: one for fetching data and another one for creating data. Fastify provides out-of-the-box support for API serialization and validation through its schema-based approach built on top of JSON Schema. Through the schema option, we can attach a schema definition to each route.
-
A View on Functional Software Architecture
JSON-schema to define templates for request and response contents.
-
Learn serverless on AWS step-by-step: Strong Types!
The syntax used to define the output is called JSON Schema. It is a standard way to define the structure of a JSON object. If you know zod, the spirit is similar. Based on Swarmion's roadmap, it will be possible to use zod schemas to defined contracts in the future, which will be super cool!
- XML is better than YAML
-
Function Calling: The Most Significant AI Feature Since ChatGPT Itself?
Essentially, all it does is attempt to generate the parameters to hypothetical or potential functions, which you using a JSON schema describe to ChatGPT.
torch-grammar
-
Show HN: LLMs can generate valid JSON 100% of the time
Yes! This is closer to the approach I took in my port of llama.cpp's grammar support to PyTorch: https://github.com/Shopify/torch-grammar/blob/main/torch_gra... ... it generates an tensor mapping each PDA stack to a map of which tokens are acceptable from that state. It seems like a much better way to do it.
-
Llama: Add Grammar-Based Sampling
I implemented this for PyTorch too at https://github.com/Shopify/torch-grammar
What are some alternatives?
outlines - Structured Text Generation
guidance - A guidance language for controlling large language models.
uplaybook - A python-centric IT automation system.
lmql - A language for constraint-guided and efficient LLM programming.
nix-configs - My Nix{OS} configuration files
Constrained-Text-Generation-Studio - Code repo for "Most Language Models can be Poets too: An AI Writing Assistant and Constrained Text Generation Studio" at the (CAI2) workshop, jointly held at (COLING 2022)
OpenAPI-Specification - The OpenAPI Specification Repository
Constrained-Text-Genera
ajv - The fastest JSON schema Validator. Supports JSON Schema draft-04/06/07/2019-09/2020-12 and JSON Type Definition (RFC8927)
relm - ReLM is a Regular Expression engine for Language Models