Structed LLM outputs via Pydantic with struct-GPT
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!
Share cardActual performance
Launch Intel predictions
Analyze your own launch →Incorrect prediction on native model
Similar products
LLM OSINT, letting GPT-4 Google about you
New LLM outperforming GPT-3.5
Worldbuilding Experiments with GPT-3
Autosummarized HN (With GPT-3)
I composed a sonata with GPT-3 DaVinci-003 and you can too
GPT Classifies HN Titles
Visualized GPT
Cerebras-GPT-2.7B finetuned on Stanford Alpaca dataset
Hostage Negotiation with GPT-4
Roleplaying GPT