Skip to content

Intercept API requests in real time, debugging incoming requests and view markdown responses

Notifications You must be signed in to change notification settings

albertomario/ollama-api-monitor

Repository files navigation

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.

Ollama API Monitor

Features

  • Intercept and save request data
  • Intercept and associate responses with requests
  • Save request and response data to browser localStorage

Requirements

  • Build Ollama from source adding github.com/gorilla/websocket and github.com/sumit-tembe/gin-requestid dependencies

Installation

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

Usage

Open the browser and go to http://localhost:11434/monitor

Screenshots

Overview Request Response

About

Intercept API requests in real time, debugging incoming requests and view markdown responses

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published