From the course: Creating Advanced AI Applications with Python, APIs, and GitHub Models
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Challenge: Function calling
From the course: Creating Advanced AI Applications with Python, APIs, and GitHub Models
Challenge: Function calling
(bright upbeat music) - [Instructor] In this challenge, we're going to continue working on our money changer app. Now, using the moneychanger.py, update the function call_llm() to include a call to the large language model of your choice that supports function calling. Then, go ahead and extract the base currency, the target currency, and the amount. And then using these values, make a call to the get_exchange_rate() function. The response back should be a tuple with the base, target, amount, and the conversion_result. Now, this is an advanced course, so we'll only be using the documentation from the large language model provider as our guide. In my case, I'll be taking a look at the function calling section in the OpenAI documentation. Let me show you really quickly what it looks like. So, you can see that this is under docs, guides, and function-calling here. Now, I'll want to make some changes to some of the sample code that's been provided here. Now, take a few minutes to review…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Using GitHub Codespaces3m 32s
-
Using ExchangeRate-API.com4m 56s
-
(Locked)
Challenge: Get_exchange_rate21s
-
(Locked)
Solution: Get_exchange_rate5m 46s
-
(Locked)
Challenge: Choose an LLM supporting multiple languages24s
-
(Locked)
Solution: Choose an LLM supporting multiple languages3m 27s
-
(Locked)
Challenge: Create an app layout37s
-
(Locked)
Solution: Create an app layout3m 56s
-
(Locked)
Challenge: LLM API call58s
-
(Locked)
Solution: LLM API call6m 28s
-
(Locked)
Function calling: Add function calling code1m 43s
-
(Locked)
Challenge: Function calling1m 12s
-
(Locked)
Solution: Function calling8m 57s
-
(Locked)
Challenge: Using tools when required52s
-
(Locked)
Solution: Using tools when required8m 44s
-
(Locked)
Deploy the app to production6m 10s
-
(Locked)
Working with LangSmith8m 22s
-
-