feat: % chance prompt insertion #5887

Closed
opened 2025-11-11 16:36:59 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @frenzybiscuit on GitHub (Jul 27, 2025).

Check Existing Issues

  • I have searched the existing issues and discussions.

Problem Description

Currently, I can't have a random event happen based on a percentage in the Default Prompt Suggestions option.

Desired Solution you'd like

Have a % chance prompt insertion in the chat.

For example, this should only happen sporadically but it's actually happening three replies into the chat.

[OOC: *(Randomly trigger one(and only one) of the following events, each with an equal 1/40 chance:)*: {
    "Zombie(T-Virus) Outbreak {
        "random_scenario": {
            "Sabatoge",
            "Accident",
            "Intentional"
        }
    }(originating from sector 7)",
    "Random faction attack(Unknown group attacks the base)",
    "Hell Portal(The dimensional machine in sector 8 activates {
        "random_scenario": {
            "Sabatoge",
            "Accident",
            "Intentional"}
        }, generating a portal and unleashing demons from hell into the base.)"
    }
]

Alternatives Considered

No response

Additional Context

No response

Originally created by @frenzybiscuit on GitHub (Jul 27, 2025). ### Check Existing Issues - [x] I have searched the existing issues and discussions. ### Problem Description Currently, I can't have a random event happen based on a percentage in the Default Prompt Suggestions option. ### Desired Solution you'd like Have a % chance prompt insertion in the chat. For example, this should only happen sporadically but it's actually happening three replies into the chat. ``` [OOC: *(Randomly trigger one(and only one) of the following events, each with an equal 1/40 chance:)*: { "Zombie(T-Virus) Outbreak { "random_scenario": { "Sabatoge", "Accident", "Intentional" } }(originating from sector 7)", "Random faction attack(Unknown group attacks the base)", "Hell Portal(The dimensional machine in sector 8 activates { "random_scenario": { "Sabatoge", "Accident", "Intentional"} }, generating a portal and unleashing demons from hell into the base.)" } ] ``` ### Alternatives Considered _No response_ ### Additional Context _No response_
Author
Owner

@Classic298 commented on GitHub (Jul 27, 2025):

you could build a filter that does this.

@Classic298 commented on GitHub (Jul 27, 2025): you could build a filter that does this.
Author
Owner

@frenzybiscuit commented on GitHub (Jul 27, 2025):

Got any guides for that? I've never touched filters.

I also wouldn't want it to be on every chat, just this specific prompt.

@frenzybiscuit commented on GitHub (Jul 27, 2025): Got any guides for that? I've never touched filters. I also wouldn't want it to be on every chat, just this specific prompt.
Author
Owner

@Classic298 commented on GitHub (Jul 27, 2025):

you can build filters which are togglable - for tutorials and guides check the docs, there are extensive infos and also check the http://openwebui.com/filters page for some templates

@Classic298 commented on GitHub (Jul 27, 2025): you can build filters which are togglable - for tutorials and guides check the docs, there are extensive infos and also check the http://openwebui.com/filters page for some templates
Author
Owner

@frenzybiscuit commented on GitHub (Jul 27, 2025):

The problem is I dont want my users having access to the filters section, and therefore they wouldnt be able to toggle them.

Unless I'm wrong about how filters work, anyway.

@frenzybiscuit commented on GitHub (Jul 27, 2025): The problem is I dont want my users having access to the filters section, and therefore they wouldnt be able to toggle them. Unless I'm wrong about how filters work, anyway.
Author
Owner

@Classic298 commented on GitHub (Jul 27, 2025):

You can still allow them to toggle filters without having to give them access to the admin panel.

Please read the docs. There are multiple tutorials there for exactly this usecase. PLEASE read the docs as i said.

@Classic298 commented on GitHub (Jul 27, 2025): You can still allow them to toggle filters without having to give them access to the admin panel. Please read the docs. There are multiple tutorials there for exactly this usecase. PLEASE read the docs as i said.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#5887