← Table of Contents · Page 819 of 868

APPENDIX H: RESUME PORTFOLIO BUILDING CAPSTONE PROJECTS

Part 9 of 56

PREREQUISITES AND SETUP You need Python, version 3.10 or newer, a plain text editor such as Notepad or any code editor, and a terminal. You need no extra packages, because every project in this appendix uses only what Python already includes. You need no paid account, because the mock model runs on your own computer. Everything is built inside one folder named project1_tool_agent. The finished folder will contain these files and folders: gate.py, tools.py, model.py, harness.py, test_harness.py, workspace, output, secret.txt, and run_log.jsonl. JSON Lines (JSONL) is a file format in which every line is one small, complete JSON record, which makes a log easy to read line by line. Running with the mock model needs nothing more. Running with a hosted or local model needs you to set the environment variable HARNESS_MODEL to hosted and to fill in the function named ask_hosted, which receives the list of messages and must return a dictionary shaped either like {"action": "tool", "tool": "read_note", "args": {"path": "workspace/note_a.txt"}} or like {"action": "finish", "text": "Done"}. The file model.py includes a helper called parse_reply that turns a model's text reply into that dictionary shape when the reply is written in JSON.
Advertisement
Read Aloud:
0:00 / 0:00