HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
jiggy-ai
pydantic-chatcompletion
Python2023–2023
jiggy-ai / pydantic-chatcompletion

pydantic-chatcompletion

Wraps openai.ChatCompletion to produce pydantic model output via schema prompt and error feedback.

2Distinct people
5Mentions
0Explicit recommenders
54GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Wraps openai.ChatCompletion to produce pydantic model output via schema prompt and error feedback.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by week5 dated mentions

Observed mentions: 2023-04-28 03:59:15 UTC to 2023-06-14 20:48:18 UTC. Weeks start Monday, UTC.

01232023-04-24 00:00:00 UTC to 2023-05-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 commentsApr 242023-05-01 00:00:00 UTC to 2023-05-08 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments2023-05-08 00:00:00 UTC to 2023-05-15 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-05-15 00:00:00 UTC to 2023-05-22 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsMay 152023-05-22 00:00:00 UTC to 2023-05-29 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-05-29 00:00:00 UTC to 2023-06-05 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-06-05 00:00:00 UTC to 2023-06-12 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-06-12 00:00:00 UTC to 2023-06-19 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsJun 12

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Apr 242023-04-24 00:00:00 UTC2023-05-01 00:00:00 UTC110
May 12023-05-01 00:00:00 UTC2023-05-08 00:00:00 UTC312
May 82023-05-08 00:00:00 UTC2023-05-15 00:00:00 UTC000
May 152023-05-15 00:00:00 UTC2023-05-22 00:00:00 UTC000
May 222023-05-22 00:00:00 UTC2023-05-29 00:00:00 UTC000
May 292023-05-29 00:00:00 UTC2023-06-05 00:00:00 UTC000
Jun 52023-06-05 00:00:00 UTC2023-06-12 00:00:00 UTC000
Jun 122023-06-12 00:00:00 UTC2023-06-19 00:00:00 UTC101

What Hacker News says

5 sources

Show HN: Structed LLM outputs via Pydantic with struct-GPT

Hey everyone, So, I stumbled upon this really cool idea of using Pydantic to deserialize and validate OpenAI's outputs over on this HN thread https://news.ycombinator.com/item?id=35821748. It got me thinking about how I'd like a slightly tweaked API to better fit my own needs. I also found some neat stuff in jiggy-ai's Pydantic implementation for chat completion https://github.com/jiggy-ai/pydantic-chatcompletion/blob/mas..., and picked up tips from various blog posts and comments on how to up the game with the quality of a model's output by providing examples. So, I cooked up this library - just about 100 lines of code, but it's got some nice features and it's fully tested. I hope some of you find it useful. I'd love to hear your thoughts and feedback. Cheers!
1 points · Open discussion
wskish·Apr 28, 2023Submission

Show HN: Easy data extraction from text with Pydantic and OpenAI

pydantic_chatcompletion is a simple but powerful wrapper for OpenAI's ChatCompletion API that enables “one line of code” extraction of structured data from unstructured text using OpenAI and Pydantic. By providing a Pydantic model as an additional argument to an OpenAI ChatCompletion call, this package allows developers to easily obtain structured data that conforms to their Pydantic model definition. It works by inserting a tuned prompt that includes the Pydantic model’s json_schema. Post-completion it further validates the language model output and remediates errors by providing feedback to the model if errors are encountered during json parsing or during Pydantic model validation. Six examples are provided for different types of unstructured data, including nested data.
3 points · Open discussion

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.