quarkus-langchain4j icon indicating copy to clipboard operation
quarkus-langchain4j copied to clipboard

Allow creating and launching an OpenWebUI container via Dev UI

Open iocanel opened this issue 1 year ago • 6 comments

Resolves: #581

The pull request introduces the following:

  • A new Open WebUI card under langchain4j extension (when using OpenAI or Ollama).
  • The Open WebUI card allows starting, stoping or launching Open WebUI.
  • OpenAI api key is automatically passed to the container (for OpenAI)
  • Ollama base url is automatically passed to the container (for Ollama)
  • Options for custom env variables, env variable mapping and port bindings are provided.
  • Added support for automatically signing up

iocanel avatar May 18 '24 13:05 iocanel

There is an issue with the volume handling. It does not appear if you've created the container manually, but will hit users that never used open-webui before and just tried to created from devui.

Converting to draft till I solve this one.

iocanel avatar May 18 '24 21:05 iocanel

@iocanel is this ready or still in draft?

geoand avatar May 21 '24 05:05 geoand

@iocanel is this ready or still in draft?

This is ready

iocanel avatar May 21 '24 05:05 iocanel

IIUC this just connects to the remote model provider directly by itself, so we can't have it working with our RAG mechanisms etc, right? Or could we make it work by perhaps, exposing the Ollama/OpenAI API by Quarkus as some kind of wrapper that adds our RAG and applies our configuration and having the OpenWebUI call the remote model through that?

jmartisk avatar May 21 '24 10:05 jmartisk

IIUC this just connects to the remote model provider directly by itself, so we can't have it working with our RAG mechanisms etc, right? Or could we make it work by perhaps, exposing the Ollama/OpenAI API by Quarkus as some kind of wrapper that adds our RAG and applies our configuration and having the OpenWebUI call the remote model through that?

Your understanding is correct, it just runs an Open WebUI instance that is aligned with the app in terms of model. Open WebUI does provide in its interface some options for configuring RAG, but I don't know if there is room for integration. It's definetely something we can explore in the future.

iocanel avatar May 21 '24 12:05 iocanel

Should we merge this or are we waiting for some changes?

geoand avatar May 22 '24 14:05 geoand

Updated PR:

  • added docker pull if needed
  • removed reference to a specific network (e.g. bridge, podman etc).
  • added progress bar.

iocanel avatar May 28 '24 13:05 iocanel

For anyone trying it with ollama running locally don't forget to set OLLAMA_HOST=0.0.0.0 otherwise ollama won't be visible from the container.

iocanel avatar May 28 '24 15:05 iocanel

I just built this locally but I don't see anything new the DevUI so I guess I am missing something :)

geoand avatar May 31 '24 09:05 geoand

@iocanel any idea about ^?

geoand avatar Jun 05 '24 11:06 geoand

@iocanel any idea about ^?

The only thing I can think of is that either you sample is not using ollama, openai or its not using a SNAPSHOT. Let me try it again.

iocanel avatar Jun 06 '24 08:06 iocanel

After rebasing, I can no longer see anything myself

iocanel avatar Jun 06 '24 09:06 iocanel

So it's not just me :)

geoand avatar Jun 06 '24 10:06 geoand

So it's not just me :) Yeah, the PR needed alignment with the new module structure. Fixed now.

iocanel avatar Jun 10 '24 12:06 iocanel

So it's not just me :)

Yeah, the PR needed alignment with the new module structure. Fixed now.

iocanel avatar Jun 10 '24 12:06 iocanel

I just tried it and it woks nicely! The UI could certainly be improved, but I think we should merge now and improve later

geoand avatar Jun 10 '24 12:06 geoand

cc @jmartisk

geoand avatar Jun 11 '24 05:06 geoand