Originally created by @damajor on GitHub (Sep 17, 2024).
Functions & Tools:
add on_valves_updated (like on pipelines, should be only a 2 lines patch)
let update Valves from inside the Function/Tool itself (that may be useful for plugins that wants to expose different user valves params based on global valves settings)
new icon management for Actions: as there is no way to embed an icon_url compatible with light & dark themes at the same time, please add icon_url_dark (any other alternatives that enable a way to have compatible colored icons on dark & light themes are also welcome)
implement decent logging for tools & functions
Valves:
add Comboboxes/Listview
add Textbox (multilines strings)
sliders for numeric values
Static text (single line like title, and another for multiline text for long descriptions)
allow user valves to be pinned, so each time we open user valves the same settings are displayed first
Originally created by @damajor on GitHub (Sep 17, 2024).
**Functions & Tools:**
- add `on_valves_updated` (like on pipelines, should be only a 2 lines patch)
- let update Valves from inside the Function/Tool itself (that may be useful for plugins that wants to expose different user valves params based on global valves settings)
- new icon management for Actions: as there is no way to embed an `icon_url` compatible with light & dark themes at the same time, please add `icon_url_dark` (any other alternatives that enable a way to have compatible colored icons on dark & light themes are also welcome)
- implement decent logging for tools & functions
**Valves:**
- add Comboboxes/Listview
- add Textbox (multilines strings)
- sliders for numeric values
- Static text (single line like title, and another for multiline text for long descriptions)
- allow user valves to be pinned, so each time we open user valves the same settings are displayed first
@thiswillbeyourgithub commented on GitHub (Feb 16, 2025):
Additionaly: it would be nice if modifying the valves of a tool made it reload in a way that allows setting the tool description dynamically. My use case was that I'm creating a tool to add anki cards (=spaced repetition flashcard) and the llm needs to know the card text fields to specify when writing its tool call. I finally made it work using a @property setter that calls a function that updates the docstring which, rather confusingly, worked only when my placeholder was in the beginning of the docstring and not when it was in the :param line because of the way the docstring gets parsed. So if updating the param could be done too that would help, as that behavior seems undocumented.
@thiswillbeyourgithub commented on GitHub (Feb 16, 2025):
Additionaly: it would be nice if modifying the valves of a tool made it reload in a way that allows setting the tool description dynamically. My use case was that I'm creating [a tool to add anki cards](https://github.com/thiswillbeyourgithub/openwebui_custom_pipes_filters/blob/main/tools/anki_tool.py#L25) (=spaced repetition flashcard) and the llm needs to know the card text fields to specify when writing its tool call. I finally made it work using [a @property setter that calls](https://github.com/thiswillbeyourgithub/openwebui_custom_pipes_filters/blob/f353d57b0f83eb35c8efa480abe54e1e7eeaeccf/tools/anki_tool.py#L105) a function that [updates the docstring](https://github.com/thiswillbeyourgithub/openwebui_custom_pipes_filters/blob/f353d57b0f83eb35c8efa480abe54e1e7eeaeccf/tools/anki_tool.py#L25) which, rather confusingly, worked only when my placeholder was in the beginning of the docstring and not when it was in the `:param` line because of the way the docstring gets parsed. So if updating the param could be done too that would help, as that behavior seems undocumented.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @damajor on GitHub (Sep 17, 2024).
Functions & Tools:
on_valves_updated(like on pipelines, should be only a 2 lines patch)icon_urlcompatible with light & dark themes at the same time, please addicon_url_dark(any other alternatives that enable a way to have compatible colored icons on dark & light themes are also welcome)Valves:
@thiswillbeyourgithub commented on GitHub (Feb 16, 2025):
Additionaly: it would be nice if modifying the valves of a tool made it reload in a way that allows setting the tool description dynamically. My use case was that I'm creating a tool to add anki cards (=spaced repetition flashcard) and the llm needs to know the card text fields to specify when writing its tool call. I finally made it work using a @property setter that calls a function that updates the docstring which, rather confusingly, worked only when my placeholder was in the beginning of the docstring and not when it was in the
:paramline because of the way the docstring gets parsed. So if updating the param could be done too that would help, as that behavior seems undocumented.@Rain6435 commented on GitHub (Aug 10, 2025):
Hey, this has been applied as per my PR. Take a look.