diff options
author | saood06 <saood05@gmail.com> | 2025-06-09 05:32:03 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-09 05:32:03 -0500 |
commit | fa90a9864a95da230065fdb9b17d14a485ef6807 (patch) | |
tree | 37cbbd019147a1d68d9c6f8f10018e2c62185b6f /examples/server | |
parent | 58f08e43859a942dcc4d585f04b729eb50603264 (diff) |
Docs update (#509)
* use npm as deps manager and vite as bundler
* update XTC docs
---------
Co-authored-by: Xuan Son Nguyen <son@huggingface.co>
Diffstat (limited to 'examples/server')
-rw-r--r-- | examples/server/README.md | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/examples/server/README.md b/examples/server/README.md index c5a4b3e7..08fc1fa5 100644 --- a/examples/server/README.md +++ b/examples/server/README.md @@ -290,6 +290,37 @@ logging: cmake --build build --config Release -t llama-server ``` +## Web UI + +The project includes a web-based user interface that enables interaction with the model through the `/chat/completions` endpoint. + +The web UI is developed using: +- `vue` framework for frontend development +- `tailwindcss` and `daisyui` for styling +- `vite` for build tooling + +A pre-built version is available as a single HTML file under `/public` directory. + +To build or to run the dev server (with hot reload): + +```sh +# make sure you have nodejs installed +cd examples/server/webui +npm i + +# to run the dev server +npm run dev + +# to build the public/index.html +npm run build +``` + +NOTE: if you are using the vite dev server, you can change the API base URL to llama.cpp. To do that, run this code snippet in browser's console: + +```js +localStorage.setItem('base', 'http://localhost:8080') +``` + ## Quick Start To get started right away, run the following command, making sure to use the correct path for the model you have: |