课程: Build Prompt Flows with Azure AI Foundry
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Add conditional control to prompt flow
- [Instructor] You can add a conditional controls to your prompt flows to implement logic like if then else or switch. Let's see how it works. Here's our demo chat flow in the Azure AI Foundry portal. In the previous video, we created two Python tools to find a matching city in the user's question. If a match is found, add a promotional message for that city to the output. Now the business wants to further promote its tour packages for specific cities by offering discounts. For example, save $100 on the trip to San Francisco and save $200 on the trip to Santa Monica. Let's see how to use conditional logic in our chat flow to implement this requirement. I will first add two Python based nodes for creating discounts. Since this is not a Python programming course, I won't go into Python syntax details. You can find the complete Python code in the course exercise files. Click add Python in the menu, enter a node name, create_discount_100, then click Add. A new Python-based node is…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。