3 ms·
Validating OpenAI's new function call with Pydantic in 50 lines of code
- jxnlco 3y agoI mostly wrote this to be as minimally invasive as possible and no require installation (just copy paste the code) The blog and code is here: https://github.com/jxnl/openai_function_call https://github.com/jxnl/openai_function_call based on a thread of notes i took yesterday: https://twitter.com/jxnlco/status/1668819081187983360 https://twitter.com/jxnlco/status/1668819081187983360 I plan to add some examples in the future on how to be creative with pydantic and also how to get better performance out.