课程: Creating Advanced AI Applications with Python, APIs, and GitHub Models
免费学习该课程!
今天就开通帐号,24,700 门业界名师课程任您挑!
Solution: Using tools when required
课程: Creating Advanced AI Applications with Python, APIs, and GitHub Models
Solution: Using tools when required
(upbeat music) - [Instructor] Now as part of our solution, we need to be able to distinguish between when we're using function calling and tools versus when we can just use the large language model. So let's go ahead and update our run_pipeline function. So this is what my run_pipeline function currently looks like, so it looks like there's a section for if I'm going to be using tool_calls or if I'm going to be using just the large language model, and this is this section over here. So let's move some of the code from here to the pipeline function, so response and the call to the large language model. And so we need to provide the input as a parameter. And so in this case, we're just going to be calling the run_pipeline instead. Now let's head over to the OpenAI documentation, and in the function calling section under the Advanced usage, if you scroll down to the bottom, you can see that if we have the finish_reason as being tool_calls, that means we are using function callings and…
内容
-
-
-
-
Using GitHub Codespaces3 分钟 32 秒
-
Using ExchangeRate-API.com4 分钟 56 秒
-
(已锁定)
Challenge: Get_exchange_rate21 秒
-
(已锁定)
Solution: Get_exchange_rate5 分钟 46 秒
-
(已锁定)
Challenge: Choose an LLM supporting multiple languages24 秒
-
(已锁定)
Solution: Choose an LLM supporting multiple languages3 分钟 27 秒
-
(已锁定)
Challenge: Create an app layout37 秒
-
(已锁定)
Solution: Create an app layout3 分钟 56 秒
-
(已锁定)
Challenge: LLM API call58 秒
-
(已锁定)
Solution: LLM API call6 分钟 28 秒
-
(已锁定)
Function calling: Add function calling code1 分钟 43 秒
-
(已锁定)
Challenge: Function calling1 分钟 12 秒
-
(已锁定)
Solution: Function calling8 分钟 57 秒
-
(已锁定)
Challenge: Using tools when required52 秒
-
(已锁定)
Solution: Using tools when required8 分钟 44 秒
-
(已锁定)
Deploy the app to production6 分钟 10 秒
-
(已锁定)
Working with LangSmith8 分钟 22 秒
-
-