Example to generate dating app profiles- combines prompt templating with JSON generation#287
Conversation
|
Awesome example! I noticed a comment mentioning that Also you'll need to run pre-commit locally to fix the formatting issues! |
|
@rlouf Thanks! I went ahead and ran the pre-commit hook and it passes now. One note on that which I also made in a comment in the code: mypy seems to have some outstanding issues with constrained pydantic typing. See the issue here: pydantic/pydantic#975 Unfortunately, that means in order to pass the pre-commit hook I had to add a As a sanity check, I also ran the pre-commit hook on the example in the README but unfortunately this failed the pre-commit hook for the same reason and requires a I'll also create an issue soon for |
brandonwillard
left a comment
There was a problem hiding this comment.
This is such a great example!
|
Created the issue here: #292 |
|
Thanks @brandonwillard! I'm a big fan of your guys' work on this, and see a lot of potential. I wanted to try JSON generation with a more complex JSON that would benefit from doing joint generation of multiple fields. Dating profiles (relevant to my day job) seemed to fit the bill. |
Let me know if there's any additional information you'd like me to add.
I figure this practical example will be useful to demonstrate more complex JSON generation alongside prompt templating (which is more useful the more complex the JSON structure becomes).