[GH-ISSUE #648] feat: Prompt templates should be able to insert clipboard text. #12160

Closed
opened 2026-04-19 18:59:06 -05:00 by GiteaMirror · 10 comments
Owner

Originally created by @horiacristescu on GitHub (Feb 5, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/648

Originally assigned to: @tjbck on GitHub.

Describe the solution you'd like
The clipboard is often inserted in a prompt as reference material. We should add a {CLIPBOARD} template variable to substitute the clipboard inside the prompt. This would work great for summarization prompts or any prompt taking web cuttings as input, and presumably be easy to implement.

Originally created by @horiacristescu on GitHub (Feb 5, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/648 Originally assigned to: @tjbck on GitHub. **Describe the solution you'd like** The clipboard is often inserted in a prompt as reference material. We should add a {CLIPBOARD} template variable to substitute the clipboard inside the prompt. This would work great for summarization prompts or any prompt taking web cuttings as input, and presumably be easy to implement.
Author
Owner

@tjbck commented on GitHub (Feb 6, 2024):

Great idea! I'll take a look and see if it's feasible to implement.

<!-- gh-comment-id:1928567331 --> @tjbck commented on GitHub (Feb 6, 2024): Great idea! I'll take a look and see if it's feasible to implement.
Author
Owner

@tjbck commented on GitHub (Feb 18, 2024):

You can now use {{CLIPBOARD}} variable! Let me know if you encounter any issues!

<!-- gh-comment-id:1950989237 --> @tjbck commented on GitHub (Feb 18, 2024): You can now use `{{CLIPBOARD}}` variable! Let me know if you encounter any issues!
Author
Owner

@this-josh commented on GitHub (Feb 22, 2024):

@tjbck I'm having trouble with this feature on Mac in Safari and Chrome.
I'm on version v1.0.0-alpha.101 and have created the following prompt (I've tried [{{CLIPBOARD}}] too and that has the same issue)
SCR-20240222-hywm

When I try selecting the prompt nothing happens.
SCR-20240222-hzal

I've also gone into my Chrome setting and manually given the URL clipboard access.

I am running open-webui in portainer on a remote machine, I'm not sure if that could be the cause of the problem.

Looking in my console I see this error message

image

<!-- gh-comment-id:1958958929 --> @this-josh commented on GitHub (Feb 22, 2024): @tjbck I'm having trouble with this feature on Mac in Safari and Chrome. I'm on version `v1.0.0-alpha.101` and have created the following prompt (I've tried `[{{CLIPBOARD}}]` too and that has the same issue) ![SCR-20240222-hywm](https://github.com/open-webui/open-webui/assets/59419126/d777d390-13aa-4158-b3c6-89219f903262) When I try selecting the prompt nothing happens. ![SCR-20240222-hzal](https://github.com/open-webui/open-webui/assets/59419126/7cb9e1bb-2dfe-4db2-820a-2a016315774c) I've also gone into my Chrome setting and manually given the URL clipboard access. I am running open-webui in portainer on a remote machine, I'm not sure if that could be the cause of the problem. Looking in my console I see this error message ![image](https://github.com/open-webui/open-webui/assets/59419126/329da3d0-905c-43bc-bbda-8304711cf1f6)
Author
Owner

@this-josh commented on GitHub (Feb 22, 2024):

Additionally, when I run open-webui on my machines docker it works fine. So it seems to be an issue with remote deployment.

<!-- gh-comment-id:1958967346 --> @this-josh commented on GitHub (Feb 22, 2024): Additionally, when I run open-webui on my machines docker it works fine. So it seems to be an issue with remote deployment.
Author
Owner

@tjbck commented on GitHub (Feb 22, 2024):

@this-josh clipboardAPI requires https!

<!-- gh-comment-id:1958975691 --> @tjbck commented on GitHub (Feb 22, 2024): @this-josh clipboardAPI requires https!
Author
Owner

@this-josh commented on GitHub (Feb 22, 2024):

Thanks for your quick reply

Okay we're on the brink of my understanding here, sorry if I say something not quite right. The webui doesn't load at all when I try accessing with https, and my localhost version works with just http

working

  • http://localhost:3000/

Error as above

  • http://155.198...

Page doesn't load at all

  • https://localhost:3000/
  • https://155.198...
<!-- gh-comment-id:1958982633 --> @this-josh commented on GitHub (Feb 22, 2024): Thanks for your quick reply Okay we're on the brink of my understanding here, sorry if I say something not quite right. The webui doesn't load at all when I try accessing with https, and my localhost version works with just `http` working - `http://localhost:3000/` Error as above - `http://155.198...` Page doesn't load at all - `https://localhost:3000/` - `https://155.198...`
Author
Owner

@justinh-rahb commented on GitHub (Feb 22, 2024):

You'll need to get the WebUI put behind a reverse proxy that can handle the HTTPS termination and translation to HTTP, but that's beyond the scope of the project, there are plenty of ways and tutorials for this.

<!-- gh-comment-id:1959421978 --> @justinh-rahb commented on GitHub (Feb 22, 2024): You'll need to get the WebUI put behind a reverse proxy that can handle the HTTPS termination and translation to HTTP, but that's beyond the scope of the project, there are plenty of ways and tutorials for this.
Author
Owner

@elsatch commented on GitHub (Mar 4, 2024):

I think there are two ways to move forward and clarify the situation for the final user:

  • Include a note in the prompt page, explaining that clipboardAPI requires https. Ideally link to a page in the docs that explains...
  • What is the fastest, simplest way to make it work when connecting to a remote server running Open WebUI?

I can volunteer to document this and send a PR to docs.

<!-- gh-comment-id:1976387166 --> @elsatch commented on GitHub (Mar 4, 2024): I think there are two ways to move forward and clarify the situation for the final user: - Include a note in the prompt page, explaining that clipboardAPI requires https. Ideally link to a page in the docs that explains... - What is the fastest, simplest way to make it work when connecting to a remote server running Open WebUI? I can volunteer to document this and send a PR to docs.
Author
Owner

@justinh-rahb commented on GitHub (Mar 4, 2024):

I would recommend against including detailed instructions for setting up HTTPS directly in the documentation. This is because there are many ways to set up production deployments with HTTPS termination, and I believe that if a user wishes to use Open WebUI at this level, they should already have the necessary knowledge to implement HTTPS termination. Providing this information may actually lead to more questions and confusion for users who are not familiar with these concepts.

<!-- gh-comment-id:1976534951 --> @justinh-rahb commented on GitHub (Mar 4, 2024): I would recommend against including detailed instructions for setting up HTTPS directly in the documentation. This is because there are many ways to set up production deployments with HTTPS termination, and I believe that if a user wishes to use Open WebUI at this level, they should already have the necessary knowledge to implement HTTPS termination. Providing this information may actually lead to more questions and confusion for users who are not familiar with these concepts.
Author
Owner

@tbendien commented on GitHub (Mar 4, 2024):

@justinh-rahb @tjbck I am looking to provide small GPU OWUI computers to school classrooms and home offices for use on local wifi networks. Any suggestions on how to implement basic https in that type of local deployment?
IMG_7500
IMG_6997
IMG_6872
IMG_7047
IMG_7493 (2)

<!-- gh-comment-id:1976776912 --> @tbendien commented on GitHub (Mar 4, 2024): @justinh-rahb @tjbck I am looking to provide small GPU OWUI computers to school classrooms and home offices for use on local wifi networks. Any suggestions on how to implement basic https in that type of local deployment? ![IMG_7500](https://github.com/open-webui/open-webui/assets/47579015/7e6829d0-75b1-4d96-9097-26ad7578b863) ![IMG_6997](https://github.com/open-webui/open-webui/assets/47579015/b15089ae-4b76-4aa5-8d7e-0d7e88dbfab2) ![IMG_6872](https://github.com/open-webui/open-webui/assets/47579015/09d5b5aa-6e9c-47eb-b03e-1453761ab232) ![IMG_7047](https://github.com/open-webui/open-webui/assets/47579015/21fe68bd-7557-48b4-ae94-5f75b8a74920) ![IMG_7493 (2)](https://github.com/open-webui/open-webui/assets/47579015/e824b9e5-e9eb-4fb8-8e9a-166ec6d88a1c)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#12160