Function Calling: How to get structured data from Chat-GPT?
Key Takeaways
Uses Function Calling to retrieve structured data from the ChatGPT API
Original Description
Do you want to call the Chat-GPT API and get back structure data? In that case you have to use Function Calling. This will allow you to get back Chat-GPT's response in JSON format, so you can use it in your application.
In this video I'll show you the easiest way to use function calling in order to get structured data from the API response.
⭐️ Libraries to install ⭐
pip install openai
pip install dotenv
⭐️Your API Key ⭐
In .env type the following:
OPENAI_API_KEY= 'sk-[YOUR API KEY]'
⭐️ Download the source code ⭐
https://tomstechacademy.com/code-example-function-calling-with-chatgpt/
⭐️ Follow me ⭐
💼 LinkedIn: https://www.linkedin.com/in/thomas--janssen/
✅ Instagram: https://www.instagram.com/tomstechacademy/
❗ Some of my videos contain affiliate links. When you click on these kind of links, I get a small percentage in case you make a purchase via the website. Be aware that this doesn't cost you anything - you never pay more than the standard retail price.
#chatgpt #chatgptapi #openai #python #pythonprogramming
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
More on: LLM Engineering
View skill →Related Reads
📰
📰
📰
📰
Building Multimodal SuperAgents: Integrating Speech, OCR, and Translation with iFly-Skills
Dev.to AI
I built a Google Sheets MCP server so Claude reads my sheets
Dev.to · Jay from PasteSheet
OpenAI scored an own goal with HuggingFace attack, showing how open Chinese models are winning
The Register
citesure 0.5.17: soft-check ORCID iDs before you ship
Dev.to · SybilGambleyyu
🎓
Tutor Explanation
DeepCamp AI