Lightweight API for converting HTML to Markdown using ReaderLM-v2, powered by llama.cpp
884
๐ A lightweight API for converting HTML to Markdown using ReaderLM-v2, powered by llama.cpp.
Supports OpenAI API format, making it easy to integrate into existing applications.
โ๏ธ Runs ReaderLM-v2 for HTML-to-Markdown conversion
โ๏ธ OpenAI-compatible API (/v1/chat/completions)
โ Multi-arch support (linux/amd64, linux/arm64)
โ๏ธ Optimized for CPU inference (no GPU required)
โ๏ธ No setup requiredโjust docker run ๐
docker run -d --name readerlm-server -p 8080:8080 rbehzadan/readerlm:latest
Starts a containerized HTTP API server at http://localhost:8080.
Send a request using Python:
import requests
messages = [
{"role": "system", "content": "Convert the HTML to Markdown."},
{"role": "user", "content": "<html><body><h1>Hello, world!</h1><p>This is a test!</p></body></html>"}
]
response = requests.post("http://localhost:8080/v1/chat/completions", json={"messages": messages, "temperature": 0.1})
markdown_output = response.json()["choices"][0]["message"]["content"].strip()
print(markdown_output)
# Hello, world!
This is a test!
To build the Docker image manually:
docker build -t readerlm:local .
docker run -p 8080:8080 readerlm:local
llama.cpp)If you encounter any issues:
Happy coding! ๐
Content type
Image
Digest
sha256:72af914d7โฆ
Size
1.5 GB
Last updated
over 1 year ago
docker pull rbehzadan/readerlm:v0.1.3