Lecture 103
Practical AI
Call an AI model from Python. Memory, system prompt, tools. Build a chat app and an AI to-do app.
01
Slides
Lecture 103Practical AIAI for ECE1 / 64
In these slides
- A quick refresher of 101 and 102
- Use AI, or build AI into your own app
- One API call: provider, key, endpoint, model
- The messages list, roles and the JSON reply
- Memory is a list. The system prompt gives the model a job
- Tools, a chat app and an AI to-do app
Open slides 64 slides · new tab · arrow keys to move
02
One timeSet up Python on your laptopPython, VS Code, a terminal and a virtual environment. Windows, macOS and Linux.Before you start
Done it in an earlier lecture? Skip this. Go to the exercises.
03
Exercises
1 exercise04
Code from the lecture
Reference. The code the lecturer ran live in class. Read it, run it, change it.