Hi! I'm a bit stuck here, how would I be able to instead of feed the function with a list of reviews feed it with a dictionary with an id_review linked to the review? That'd be very useful, thanks in advance and great job!
Did you try to put the instructions about the JSON output into the system prompt? Also it helps sometimes to threaten the model that people will get hurt or kittens if it doesn't follow instructions :)
All the code is in the blog post - www.markhneedham.com/blog/2023/07/27/return-consistent-predictable-valid-json-openai-gpt/ And the notebook is here - github.com/mneedham/LearnDataWithMark/blob/main/json-gpt/notebooks/SentimentAnalysis.ipynb
Awesome, simple & sharp thanks !
This video is super helpful and saved my full day.
Exactly what I was looking for!
This video is amazing, very illustrating example. Just commenting to help get it more attention.
Thanks for your kind words!
thx so much from Paraguay
works like a charm! Thank you so much!
Nice
Super helpful, thank you so much, I was stuck and this helped a lot.
Glad it was useful!
appreciate it, thanks!
Cool! Didn't even know functions existed 😅. Thanks for the awesome video 👍
It was my first time using that functionality too. I think I should probably work out how to use them properly now!
Amazing video and content, more openAI videos pls 🙏
Any particular topics?
Helpful
nice video
Thanks!
thanks man
Hi!
I'm a bit stuck here, how would I be able to instead of feed the function with a list of reviews feed it with a dictionary with an id_review linked to the review? That'd be very useful, thanks in advance and great job!
Can you explain what you want to do a bit more? Email it to me if it's easier - m.h.needham@gmail.com
Clever stuff
you are so human. - googi
Did you try to put the instructions about the JSON output into the system prompt? Also it helps sometimes to threaten the model that people will get hurt or kittens if it doesn't follow instructions :)
I did try that and most of the time it would work, but occasionally it'd go rogue!
To the point. Nice. What do u think of pydantic now? Or the updated gpt to output json?
I haven't tried either of those yet. Do they work as well as the function approach?
very interesting hack. Is this still relevant today?
I don't think you really need it now - you can use the structured outputs feature instead
th-cam.com/video/xlhvQ9f37LU/w-d-xo.html
Can we get link to the code please 😊
All the code is in the blog post - www.markhneedham.com/blog/2023/07/27/return-consistent-predictable-valid-json-openai-gpt/
And the notebook is here - github.com/mneedham/LearnDataWithMark/blob/main/json-gpt/notebooks/SentimentAnalysis.ipynb
@@learndatawithmark thank you