mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-04-11 19:28:30 +00:00
1.5 KiB
1.5 KiB
title, order, status
| title | order | status |
|---|---|---|
| Building a Desktop LLM App with cpp-httplib | 0 | draft |
Build an LLM-powered translation desktop app step by step, learning both the server and client sides of cpp-httplib along the way. Translation is just an example — swap it out to build your own summarizer, code generator, chatbot, or any other LLM application.
Dependencies
- llama.cpp — LLM inference engine
- nlohmann/json — JSON parser (header-only)
- webview/webview — WebView wrapper (header-only)
- cpp-httplib — HTTP server/client (header-only)
Chapters
- Embed llama.cpp and create a REST API — Start with a simple API that accepts text via POST and returns a translation as JSON
- Add token streaming with SSE — Stream translation results token by token using the standard LLM API approach
- Add model discovery and download — Use the client to search and download GGUF models from Hugging Face
- Add a Web UI — Serve a translation UI with static file hosting, making the app accessible from a browser
- Turn it into a desktop app with WebView — Wrap the web app with webview/webview to create an Electron-like desktop application
- Code reading: llama.cpp's server implementation — Compare your implementation with production-quality code and learn from the differences