[GH-ISSUE #5907] bug: FUNCTIONS_DIR not being used #14170

Closed
opened 2026-04-19 20:37:24 -05:00 by GiteaMirror · 4 comments
Owner

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-ollama

Environment

  • Open WebUI Version: v0.3.23
  • FUNCTIONS_DIR: "/app/backend/functions"

Expected Behavior:

FUNCTIONS_DIR with 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:

app
├── backend
│   ├── functions
│   │   ├── some_function.py

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_DIR is actually picked up. Is something misconfigured?

Reproduction Details

Steps to Reproduce:

  • Build an image with a functions folder containing a *.py file.
  • Start the container with FUNCTIONS_DIR pointing to that directory
  • Open UI

Additional Information

N/A

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-ollama` ## Environment - **Open WebUI Version:** v0.3.23 - `FUNCTIONS_DIR: "/app/backend/functions"` ## Expected Behavior: `FUNCTIONS_DIR` with 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](https://docs.openwebui.com/getting-started/env-configuration/#functions_dir) `FUNCTIONS_DIR`, but they're not showing up. My directory structure in the container looks like: ```txt app ├── backend │ ├── functions │ │ ├── some_function.py ``` 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_DIR` is actually picked up. Is something misconfigured? ## Reproduction Details **Steps to Reproduce:** - Build an image with a functions folder containing a `*.py` file. - Start the container with `FUNCTIONS_DIR` pointing to that directory - Open UI ## Additional Information N/A
Author
Owner

@tjbck commented on GitHub (Oct 4, 2024):

Good catch, FUNCTIONS_DIR has been Deprecated.

<!-- gh-comment-id:2393735120 --> @tjbck commented on GitHub (Oct 4, 2024): Good catch, `FUNCTIONS_DIR` has been Deprecated.
Author
Owner

@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.

<!-- gh-comment-id:2394017616 --> @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.
Author
Owner

@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!

<!-- gh-comment-id:2394322405 --> @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!
Author
Owner

@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!

<!-- gh-comment-id:2397324040 --> @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!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#14170