Beginner
Build a few-shot message list
Write build_shots(system, examples, text) that returns a list of chat messages (dictionaries with role and content).
Order: one system message, then for each (ticket, label) in examples a user message (the ticket) followed by an assistant message (the label), then a final user message with text.
What Check tests
- No examples gives system then user
- Each example is a user message then an assistant message
- Contents are in order
- The real input is the last message
Stuck? One hint at a time
The solution unlocks after your first Check. Try first: that is where the learning happens.
main.py
Sign in to run your code.
Output
Press Run to see what your program prints.