As from GPT-3.5- Turbo, Chat-GPT allows to set response_format as part of the parameters of an API call. But even using this parameter doesn't guarantee the response is in a consistent format. In this video I show how you can ensure a consistent response and how to avoid invalid JSON response because of insufficient tokens.
⭐️ Copy the source code here ⭐
🔗 tomstechacademy.com/code-exam...
⭐️ Links ⭐
🔗 Python Open File function: www.w3schools.com/python/pyth...
🔗 JSON Mode Documentation: platform.openai.com/docs/guid...
⭐️ Other helpful videos⭐
• How to get an Open AI ...
⭐️ Follow me ⭐
💼 LinkedIn: / thomas--janssen
✅ Instagram: / tomstechacademy
#python #chatgpt #artificialintelligence
Негізгі бет Get consistent JSON response from OpenAI / Chat-GPT
Пікірлер: 21