Fork of xsharov/enchanted-ollama-openrouter-proxy.
TODO comments).
You can provide your OpenRouter (OpenAI-compatible) API key through an environment variable or a command-line argument:
# export OPENAI_BASE_URL="https://some-open-ai-api/api/v1/" # Optional. Defaults to https://openrouter.ai/api/v1/
export OPENAI_API_KEY="your-api-key"
./ollama-proxy ./ollama-proxy "your-openrouter-api-key"or
./ollama-proxy "https://some-open-ai-api/api/v1/" "your-api-key"Once running, the proxy listens on port 11434. You can make requests to http://localhost:11434 with your Ollama-compatible tooling.
-
Clone the Repository:
git clone https://github.com/your-username/ollama-openrouter-proxy.git cd ollama-openrouter-proxy -
Install Dependencies:
go mod tidy -
Build:
go build -o ollama-proxy