mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 23:21:44 -05:00
[GH-ISSUE #11866] feat: endpoint to open a new chat with some pre-populated text #16383
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @computerdane on GitHub (Mar 19, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/11866
Check Existing Issues
Problem Description
I want to better be able to integrate Open WebUI with other apps.
Desired Solution you'd like
An API endpoint that, when called, will open a new chat for a user that has the first message pre-populated. This would make it so that in other applications, you can add an "Ask with Open WebUI" button that sends some content to a new chat for you.
Alternatives Considered
I considered maybe adding the ability to embed a little micro AI chat into a page, but we all know how much of a mistake web embeds were.
Additional Context
The use case I have in mind is for our company's knowledge base. It would be awesome to be able to send a knowledge base article to a AI chat and ask questions about it.
@computerdane commented on GitHub (Mar 19, 2025):
I have been looking around the API source for something that could work, and I see that you can create new chats using the API, but there isn't a way to do it using a redirect or GET request. My thinking is that it would need to be a redirect so that the user's browser session can be used to make the new chat. That way, the page with the link to Open WebUI wouldn't need to do authenticated API requests on the user's behalf
@computerdane commented on GitHub (Mar 19, 2025):
The other idea would be to allow anonymous POSTs to the API that store a temporary message template with an ID, and then redirect the user to a GET request with that ID that then fills in their chat with the template
@tjbck commented on GitHub (Mar 19, 2025):
This already exists. https://docs.openwebui.com/features/chat-features/url-params#url-parameter-overview
@computerdane commented on GitHub (Mar 19, 2025):
Awesome, sorry I missed that. Thank you!