[GH-ISSUE #3718] enh: Allow functions/pipelines to access interact with tools natively #13360

Closed
opened 2026-04-19 20:07:31 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @michaelpoluektov on GitHub (Jul 8, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/3718

Is your feature request related to a problem? Please describe.
Right now we're limited to either implement tool calling within a function/pipeline directly, or using the default function calling pipeline.

  • By re-implementing tool calling in a pipeline, we have to define all tools directly, which makes it harder for users to pull extra tools. Additionally, we can't select/de-select them from the UI.
  • By using native tool calling, we can't control when tools are called (for example, it's impossible to implement an OpenAI-like tool call in the middle of a message), and in the case of functions, we can't know when the pipe() function is called to generate tool call responses.

Describe the solution you'd like
For a function/pipeline, add an optional attribute called "prepend_tools" that decides if the tools are called and appended to the system prompt before responding.
Add an optional parameter to pipe(), called, say, __tool_signatures__ and __tool_callables__ (or simply __tools__: dict) with __tools__["signatures"] and __tools__["callables"] pointing to signatures (in OpenAI JSON format) and and callables respectively

Originally created by @michaelpoluektov on GitHub (Jul 8, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/3718 **Is your feature request related to a problem? Please describe.** Right now we're limited to either implement tool calling within a function/pipeline directly, or using the default function calling pipeline. - By re-implementing tool calling in a pipeline, we have to define all tools directly, which makes it harder for users to pull extra tools. Additionally, we can't select/de-select them from the UI. - By using native tool calling, we can't control _when_ tools are called (for example, it's impossible to implement an OpenAI-like tool call in the middle of a message), and in the case of functions, we can't know when the pipe() function is called to generate tool call responses. **Describe the solution you'd like** For a function/pipeline, add an optional attribute called "prepend_tools" that decides if the tools are called and appended to the system prompt before responding. Add an optional parameter to pipe(), called, say, `__tool_signatures__` and `__tool_callables__` (or simply `__tools__: dict`) with `__tools__["signatures"]` and `__tools__["callables"]` pointing to signatures (in OpenAI JSON format) and and callables respectively
Author
Owner

@michaelpoluektov commented on GitHub (Aug 19, 2024):

Draft implementation

https://github.com/open-webui/open-webui/pull/4724

<!-- gh-comment-id:2296358225 --> @michaelpoluektov commented on GitHub (Aug 19, 2024): Draft implementation https://github.com/open-webui/open-webui/pull/4724
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#13360