Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev UI chat page: support images in messages #458

Open
jmartisk opened this issue Apr 11, 2024 · 12 comments
Open

Dev UI chat page: support images in messages #458

jmartisk opened this issue Apr 11, 2024 · 12 comments
Labels
enhancement New feature or request

Comments

@jmartisk
Copy link
Collaborator

No description provided.

@jmartisk
Copy link
Collaborator Author

Hm, I'm trying to implement attaching images using the Vaadin upload component and then converting to base64 in the frontend and passing it to a jsonrpc invocation, but I'm hitting some kind of limitation where the websocket for JsonRPC invocations can only handle messages up to 100 kB, anything bigger crashes the websocket :(

@phillip-kruger have you perhaps tried anything similar before?

@jmartisk
Copy link
Collaborator Author

(For clarity, the intended use case is creating an image-based chat message to pass to gpt-4-turbo or any other model that has computer vision capabilities)

@phillip-kruger
Copy link
Member

In that case just use normal post, not the ws. You will have to use another comment or build your own

@jmartisk
Copy link
Collaborator Author

Yeah that will make things somewhat more complicated because the image will arrive completely independently of the accompanying text message, but I'll give it a try

@phillip-kruger
Copy link
Member

Shout if I can help

@jmartisk
Copy link
Collaborator Author

Hm, I now realize, if I want to add a custom endpoint beyond JSON-RPC (either a REST endpoint or a reactive route) then I have to add some kind of HTTP extension, and we recently removed that to make quarkus-langchain4j suitable for CLI applications :(

@phillip-kruger
Copy link
Member

This is only for Dev UI. And you have Verx-http in Dev UI

@jmartisk
Copy link
Collaborator Author

We don't have that as a dependency of the extension (neither the deployment, nor the runtime artifact). Quarkus apparently brings it in when the user runs dev mode, but we don't have any compile-time dependency on it (when compiling the extension)

@phillip-kruger
Copy link
Member

Ok I see. Maybe I can add something to the Dev UI to make this possible.
How urgent is this ?

@jmartisk
Copy link
Collaborator Author

It would be cool to have the ability to post images for demoing on conferences (the first is in the half of May), but even if it doesn't work out I still have enough material to present :)

@jmartisk
Copy link
Collaborator Author

Simply making the jsonrpc endpoint accept messages over 100 kB isn't possible? I don't know where the limitation is coming from. But lifting it would be the easiest solution.

@phillip-kruger
Copy link
Member

Yea I am not sure where that comes from. It's not something I set in Dev UI so must be some default of Vertx Web Sockets. If you can find and increase that, go for it !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants