This repo is code from the article on this topic.
-
Give a password to
mitmproxy's web UI. Runexport MITM_PASSWORD=carpets-on-swimming-pools. -
Start
mitmproxy's web UI withmake mitm. Let it run and open a new Terminal session. -
There's an example LLM application in
main.py, that uses a whole bunch of LLM APIs. Run it withmake main.
To build and run as a Docker continer:
docker build -t mapp . && {
docker rm -f mapp
docker run --name mapp -d -p 5021:9021 -p 5022:9022 -e MITM_PASSWORD= -e OPENAI_API_KEY= mapp
}