mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[GH-ISSUE #5907] bug: FUNCTIONS_DIR not being used #14170
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @gpgn on GitHub (Oct 4, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/5907
Bug Report
Installation Method
Docker image:
ghcr.io/open-webui/open-webui:0.3.23-ollamaEnvironment
FUNCTIONS_DIR: "/app/backend/functions"Expected Behavior:
FUNCTIONS_DIRwith local files is respected and Function is visible in UI.Actual Behavior:
Only Functions in database show up, no Python files that exist in
FUNCTIONS_DIR.Description
Thanks for the nice work! I'm trying to get a custom function to show up in the UI by setting
FUNCTIONS_DIR, but they're not showing up. My directory structure in the container looks like:Combined with
FUNCTIONS_DIR=/app/backend/functions.Instead, when I upload a function through the UI, it ends up in the database and does show in the UI.
When scanning the code base I could not find how
FUNCTIONS_DIRis actually picked up. Is something misconfigured?Reproduction Details
Steps to Reproduce:
*.pyfile.FUNCTIONS_DIRpointing to that directoryAdditional Information
N/A
@tjbck commented on GitHub (Oct 4, 2024):
Good catch,
FUNCTIONS_DIRhas been Deprecated.@gpgn commented on GitHub (Oct 4, 2024):
@tjbck Thanks for confirming. Is there another way to keep functions as code and under version control, and have them available at startup of the container?
I guess we can do inserts in the database but its more cumbersome and messy to manage in a declarative/IaC way.
@tjbck commented on GitHub (Oct 4, 2024):
Unfortunately not at the moment, migration to the database had to be introduced to enable uses cases like using multiple open webui instances for load balancing, but I will try to think of something that might streamline your workflow once I'm done implementing all the priority features!
@justinh-rahb commented on GitHub (Oct 7, 2024):
Git integration has long been on the roadmap, I'm sure Tim will come up with something nice!