You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -335,6 +337,62 @@ The above code makes the backend available to select. If you want it to be the
335
337
336
338
#+html: </details>
337
339
340
+
#+html: <details><summary>
341
+
**** Open WebUI
342
+
#+html: </summary>
343
+
344
+
[[https://openwebui.com/][Open WebUI]] is an open source, self-hosted system which provides a multi-user web chat interface and an API endpoint for accessing LLMs, especially LLMs running locally on inference servers like Ollama.
345
+
346
+
Because it presents an OpenAI-compatible endpoint, you use ~gptel-make-openai~ to register it as a backend.
347
+
348
+
For instance, you can use this form to register a backend for a local instance of Open Web UI served via http on port 3000:
349
+
350
+
#+begin_src emacs-lisp
351
+
(gptel-make-openai "OpenWebUI"
352
+
:host "localhost:3000"
353
+
:protocol "http"
354
+
:key "KEY_FOR_ACCESSING_OPENWEBUI"
355
+
:endpoint "/api/chat/completions"
356
+
:stream t
357
+
:models '("gemma3n:latest"))
358
+
#+end_src
359
+
360
+
Or if you are running Open Web UI on another host on your local network (~box.local~), serving via https with self-signed certificates, this will work:
361
+
362
+
#+begin_src emacs-lisp
363
+
(gptel-make-openai "OpenWebUI"
364
+
:host "box.local"
365
+
:curl-args '("--insecure") ; needed for self-signed certs
366
+
:key "KEY_FOR_ACCESSING_OPENWEBUI"
367
+
:endpoint "/api/chat/completions"
368
+
:stream t
369
+
:models '("gemma3n:latest"))
370
+
#+end_src
371
+
372
+
To find your API key in Open WebUI, click the user name in the bottom left, Settings, Account, and then Show by API Keys section.
373
+
374
+
Refer to the documentation of =gptel-make-openai= for more configuration options.
375
+
376
+
You can pick this backend from the menu when using gptel (see [[#usage][Usage]])
377
+
378
+
***** (Optional) Set as the default gptel backend
379
+
380
+
The above code makes the backend available to select. If you want it to be the default backend for gptel, you can set this as the value of =gptel-backend=. Use this instead of the above.
0 commit comments