Function Calling: How to get structured data from Chat-GPT?

Thomas Janssen · Intermediate ·🧠 Large Language Models ·2y ago

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

Related Reads

📰
Building Multimodal SuperAgents: Integrating Speech, OCR, and Translation with iFly-Skills
Learn to build multimodal SuperAgents that integrate speech, OCR, and translation using iFly-Skills, enabling AI to interact with the physical world
Dev.to AI
📰
I built a Google Sheets MCP server so Claude reads my sheets
Turn a Google Sheet into a read-only MCP server that Claude can query using plain English, no coding required
Dev.to · Jay from PasteSheet
📰
OpenAI scored an own goal with HuggingFace attack, showing how open Chinese models are winning
OpenAI's criticism of Hugging Face's Chinese model highlights the vulnerability of closed models and the rising competitiveness of open Chinese models
The Register
📰
citesure 0.5.17: soft-check ORCID iDs before you ship
Learn to soft-check ORCID iDs in bibliographies using citesure 0.5.17 to ensure data accuracy
Dev.to · SybilGambleyyu
Up next
5 Levels of AI Agents - From Simple LLM Calls to Multi-Agent Systems
Dave Ebbelaar (LLM Eng)
Watch →