How to get GPT3 to Output in JSON


The app we made interfaced with the OpenAI API to send our scanned letter with our engineered prompt to in turn receive the output generated by the text-DaVinci-03 model. Our prompt was engineered in such a way that the text the model outputted was in JSON format and could be easily parsed. This allowed us to easily put the data in the right places in the application.

In this post, I will give some tips and findings from building this application and how you can prompt a GPT3 model such as text-DaVinci-03 to return a JSON formatted text.



首页 - Wiki
Copyright © 2011-2023 iteam. Current version is 2.118.1. UTC+08:00, 2023-10-05 11:45
浙ICP备14020137号-1 $访客地图$