← Table of Contents · Page 814 of 868

APPENDIX H: RESUME PORTFOLIO BUILDING CAPSTONE PROJECTS

Part 4 of 56

THE MOCK MODEL AND WHY IT IS HERE A real agent uses a Large Language Model, and reaching a real one needs an account, a secret key, and usually a small fee. You do not need any of that for this appendix. Every project includes a mock model, which is a small scripted stand-in that follows a fixed recipe and always behaves the same way. The mock is not intelligent, and we do not pretend that it is. Its only job is to let you test the harness around it, which is the thing you are being trained to build. Every project routes all model calls through a single function named ask_model, so that later you can connect a real hosted model, or a model running on your own computer, by filling in one small function. To use a real model, you set an environment variable named HARNESS_MODEL to the word hosted, and you write the body of the function named ask_hosted using the instructions from your model provider. A hosted model is one that runs on a provider's computers and that you reach over the internet, and a local model is one that runs on your own computer. Either kind must return the same simple dictionary that the mock returns, and each project shows you the exact shape. Keep your secret key out of your files, because a key typed into a file can leak when you share the project; read it from an environment variable instead, and never put it in a screenshot. Results from a real model can change from one run to the next, so the tests in this appendix are written for the mock, and you should describe any real-model results as sample runs rather than guarantees.
Advertisement
Read Aloud:
0:00 / 0:00