[GH-ISSUE #10424] [FEAT] st-script equivalent for powerfull AND reliable function calling #15887

Closed
opened 2026-04-19 21:58:07 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @nekopep on GitHub (Feb 20, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/10424

One powerful thing you want to do with LLM is using function calling. Thus, for example, you can connect OpenWebUI to your ERP to execute some tasks. The issue is that because LLMs are stochastic, you need to be sure the parameters sent are OK before executing the function on critical systems. Also, sometimes, you need to execute a complex workflow doing multiple tasks, asking the user for more parameters after each function call.

I found that Silly Tavern, which is a chat oriented for role-playing, has put in place a clever thing: you can script a workflow and the LLM is guided via this workflow through predefined user interactions.

https://docs.sillytavern.app/usage/st-script/

Is your feature request related to a problem? Please describe.

When I do function calls with my LLM, I'm frustrated that sometimes it hallucinates parameters even when specifying in the system prompt to double-check. Hence, I'm looking for a reliable function call that is guided via UI double-check before the call.

Describe the solution you'd like

Currently:

  • User: "Hello, please create a new user task for John Doe"
  • LLM: "I created a task for John Doe, arrival date (random date), department (randomly chosen), access rights: (randomly chosen)."

Even with a system prompt in place, you can sometimes have random parameters called.

With a script in place:

  • User: "Hello, please create a new user task for John Doe"
    • Call UI-script with prefilled parameters from LLM
    • get_var(str, "username", "john doe") <- John Doe prefilled
    • get_var(list, "arrival date", "01/01/2020") <- wrongly prefilled, but the user can change it
    • get_var(list, "department", none) <- LLM did not fill it, so the user can fill it
    • get_var(list, "access", ['groupA', 'groupB'], ["groupA", "groupB", "groupC"]) <- LLM chose A and B, and the user can select among A, B, C.
    • User clicks on run, LLM calls the function with all parameters filled.

Image

Describe alternatives you've considered

System prompt, better doc strings in function calls, Mermaid graphs in function calls.

Originally created by @nekopep on GitHub (Feb 20, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/10424 One powerful thing you want to do with LLM is using function calling. Thus, for example, you can connect OpenWebUI to your ERP to execute some tasks. The issue is that because LLMs are stochastic, you need to be sure the parameters sent are OK before executing the function on critical systems. Also, sometimes, you need to execute a complex workflow doing multiple tasks, asking the user for more parameters after each function call. I found that Silly Tavern, which is a chat oriented for role-playing, has put in place a clever thing: you can script a workflow and the LLM is guided via this workflow through predefined user interactions. https://docs.sillytavern.app/usage/st-script/ **Is your feature request related to a problem? Please describe.** When I do function calls with my LLM, I'm frustrated that sometimes it hallucinates parameters even when specifying in the system prompt to double-check. Hence, I'm looking for a reliable function call that is guided via UI double-check before the call. **Describe the solution you'd like** Currently: - User: "Hello, please create a new user task for John Doe" - LLM: "I created a task for John Doe, arrival date (random date), department (randomly chosen), access rights: (randomly chosen)." Even with a system prompt in place, you can sometimes have random parameters called. With a script in place: - User: "Hello, please create a new user task for John Doe" - Call UI-script with prefilled parameters from LLM - `get_var(str, "username", "john doe")` <- John Doe prefilled - `get_var(list, "arrival date", "01/01/2020")` <- wrongly prefilled, but the user can change it - `get_var(list, "department", none)` <- LLM did not fill it, so the user can fill it - `get_var(list, "access", ['groupA', 'groupB'], ["groupA", "groupB", "groupC"])` <- LLM chose A and B, and the user can select among A, B, C. - User clicks on run, LLM calls the function with all parameters filled. ![Image](https://github.com/user-attachments/assets/f316b5f0-e56d-4b02-afc8-2cfc2153b216) **Describe alternatives you've considered** System prompt, better doc strings in function calls, Mermaid graphs in function calls.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#15887