🚀 LEVEL UP TO SENIOR:Unlock 500+ Advanced Practical Challenges & Exercises.
🎓 COURSERA PARTNER:Earn professional Google, Meta, and IBM certificates to supercharge your resume.

Project 20: Pricing Summary Bot

AI Engineer
Current Task

Objective

Review day: combine a PromptTemplate and a model into a chain — day 4's LLMChain pattern — for a pricing summary.

Task: build a pricing prompt, pipe it into a model, and print the chain's input keys.

index.py
from langchain_core.prompts import PromptTemplate from langchain_openai import ChatOpenAI prompt = PromptTemplate.from_template("Summarize this pricing tier: {tier}") model = ChatOpenAI(model="gpt-4o-mini") chain = prompt | model print(chain.input_schema.model_json_schema()["required"])

* Hint: Correct characters turn green, incorrect ones turn red.

Live Preview
🖼️

Verify your code to see the preview