ahyatt / llm

A package abstracting llm capabilities for emacs.
GNU General Public License v3.0
142 stars 19 forks source link

Open WebUI compatibility #50

Open LemonBreezes opened 1 week ago

LemonBreezes commented 1 week ago

Hello. Can you please add Open WebUI compatibility? It's an app that I can self-host from docker to provide a nice ChatGPT UI for all of my devices: https://github.com/open-webui/open-webui.

I have done this here for chatgpt-shell: https://github.com/xenodium/chatgpt-shell/issues/201. Basically, it seems mostly OpenAI compatible on http://127.0.0.1:3000/ollama/api/chat but doesn't have the choices part of the JSON responses. Open WebUI is also based on Ollama and has an endpoint on http://127.0.0.1:3000/ollama/ I think but it does require a key for authorization since it supports multiple users.

ahyatt commented 3 days ago

It kind of seems like this should work with the ollama provider as is, maybe apart from the authorization, which seems like you might want something custom for. Ollama doesn't have choices as part of its response either, so it seems compatible (and the website also claims compatibility). Have you tried the ollama provider for this?