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

免费学习该课程!

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

Solution:  LLM API call

Solution: LLM API call

(upbeat music) - [Instructor] One of the ways to make an API call to the large language model of my choice is to head over to github.com/marketplace. Now, since I'm using the OpenAI GPT-4o mini model, I'm going to go ahead and select get API key, and it looks like one of the first things I need to do is to install the OpenAI package. So it looks like this package is already installed, so let me just go ahead and grab the version of OpenAI package that I have here, so that's 1.59.6, and let me update my requirements.text file. So that's OpenAI==1.59.6. Let me just go ahead and clear my screen. Now, let's head back to github.com/marketplace, and let me go ahead and grab some code that'll allow me to use this Python package. This boilerplate code will allow me to use the OpenAI package. Let me copy this across to moneychanger.py. Let me head back to github.com/marketplace, and let's make the API call to the GPT-4o mini model. And so let me head over to the function call LLM, and my…

内容