Important
This repo contain core changes to the original Ollama repository. Is adviced to not use this feature in production environment. I'm not responsible for any damage caused by this feature.
- Intercept and save request data
- Intercept and associate responses with requests
- Save request and response data to browser
localStorage
- Build Ollama from source adding
github.com/gorilla/websocket
andgithub.com/sumit-tembe/gin-requestid
dependencies
Clone ollama repository and go to the directory
git clone https://github.com/ollama/ollama.git
cd ollama
Copy modified files from ollama-changes
to ollama
directory
cp -r ../path/to/ollama-changes/* .
Check if patch applies successfully and there are no conflicts
git apply --stat ollama-monitor-ui.patch
If there are no conflicts, apply the patch
git am --keep-cr --signoff < ollama-monitor-ui.patch
Install dependencies
go get github.com/gorilla/websocket
go get github.com/sumit-tembe/gin-requestid
Build and run the server
go build .
./ollama serve
Open the browser and go to http://localhost:11434/monitor