From the course: Build with AI: Building a Project with the ChatGPT API
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Integrate tools using function calling
From the course: Build with AI: Building a Project with the ChatGPT API
Integrate tools using function calling
- [Narrator] Your agent may be smart, but on its own, it's limited to the knowledge it was trained on. If you want it to look up real time weather, send a Slack message or fetch a list of tasks from your project management app, you'll need to give it tools. Agents get smarter when they can use tools like calling your own code, searching the web reading files, controlling your browser, or even executing commands on your local machine. For this course, we'll focus on calling your own code using function calling. What is Function Calling? Function Calling enables your agent to understand when a task requires an external action, automatically format input arguments based on the user's request, and trigger the appropriate function in your application code. You define the available tools and the model decides when and how to call them. Let's say you want to connect your agent to a real-time asteroid data API. Instead of writing a prompt like, "Tell me how many asteroids are headed toward…
Contents
-
-
-
-
(Locked)
Understand the foundations of AI agents2m 59s
-
(Locked)
Select models and define instructions2m 42s
-
(Locked)
Integrate tools using function calling2m 17s
-
(Locked)
Build with the OpenAI Agents SDK8m 39s
-
(Locked)
Apply guardrails for safe agent behavior7m 6s
-
(Locked)
Challenge: Add agent features to your movie script generator1m 41s
-
(Locked)
Solution: Add agent features to your movie script generator8m 44s
-
(Locked)
-
-
-