课程: Creating Advanced AI Applications with Python, APIs, and GitHub Models

免费学习该课程!

今天就开通帐号,24,700 门业界名师课程任您挑!

Challenge: Function calling

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…

内容