Ty

Tysm, a Rust crate for using ChatGPT with Structured Outputs

Hacker News

Tysm, a Rust crate for using ChatGPT with Structured Outputs

Hi HN! This Christmas I made `tysm`, a rust crates which simplifies using ChatGPT with Structured Outputs. Essentially you just tell it the rust type you want the output to conform to, and it handles creating the JSON Schema, passing it to ChatGPT's chat-completions API, and deserializing the response. Structured Outputs are very useful because they guarantee that the response will conform to whatever type you expect. I'm already finding my crate very useful since I love using Structured Outputs but I hate writing JSON Schemas myself. Technical details for rust heads: To generate the JSON Schema, it uses an unreleased version of the `schemars` crate. (Hopefully it will be released soon and then I won't have to put up this disclaimer anymore.) For deserialization, it uses `serde`.

Share card

Actual performance

7points
Made the leaderboard

Launch Intel predictions

Analyze your own launch →
AppSumoStrong fit for a featured deal · Strong signals: soon · Missing: plus, platform, intuitive
54%54% predicted probability of success on AppSumo, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Product HuntOn track for Day 1 leaderboard · Strong signals: chatgpt, using · Missing: mac, agents, macos
51%51% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
Hacker NewsMay not resonate with HN audience · Strong signals: io · Missing: https docs, excited, just released
43%43% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
Indie HackersIH features products with proven revenue · Missing: supports, reddit linkedin, podcasting
41%41% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Missing: mobile apps, ios, personal
30%30% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
13%13% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Strong signals: chat · Missing: web3, crypto, cryptocurrency
5%5% predicted probability of success on BetaList, based on ML models trained on real launch data.

Incorrect prediction on native model

Similar products

Ho
How to Annoy Your Coworkers for $42 Using ClojureScript and Rust47%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

How to Annoy Your Coworkers for $42 Using ClojureScript and Rust

Hacker News74
Em
Emulating aarch64 in software using JIT compilation and Rust48%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Emulating aarch64 in software using JIT compilation and Rust

Hacker News2
Ch
ChatGPT built in Rust + Vue45%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

ChatGPT built in Rust + Vue

Hacker News1
Ig
Igrepper – Interactive grepping using ncurses and rust59%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Igrepper – Interactive grepping using ncurses and rust

Hacker News4
I
I rendered the Rust logo using Rust67%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

I rendered the Rust logo using Rust

Hacker News3
St
Structured, composable logging for Rust62%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Structured, composable logging for Rust

Hacker News1
YA
YAML to Django Using ChatGPT49%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

YAML to Django Using ChatGPT

Hacker News4
Sc
Screencast: An Introduction to Rust57%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Screencast: An Introduction to Rust

Hacker News3
Ha
Handlebars for Rust51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Handlebars for Rust

Hacker News2
Ox
Oxischeme – A Scheme implementation in Rust56%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Oxischeme – A Scheme implementation in Rust

Hacker News18