open-webui / pipelines

Pipelines: Versatile, UI-Agnostic OpenAI-Compatible Plugin Framework
MIT License
714 stars 202 forks source link

Basic detoxify_filter_pipeline Command Doesn't Work #257

Open nickibarlowSDI opened 1 week ago

nickibarlowSDI commented 1 week ago

I think this was shipped without being tested.

docker run -d -p 9099:9099 --add-host=host.docker.internal:host-gateway -e PIPELINES_URLS="https://github.com/open-webui/pipelines/blob/main/examples/filters/detoxify_filter_pipeline.py" -v pipelines:/app/pipelines --name pipelines --restart always ghcr.io/open-webui/pipelines:main
/usr/local/lib/python3.11/site-packages/transformers/tokenization_utils_base.py:1601: FutureWarning: `clean_up_tokenization_spaces` was not set. It will be set to `True` by default. This behavior will be depracted in transformers v4.45, and will be then set to `False` by default. For more details check this issue: https://github.com/huggingface/transformers/issues/31884

warnings.warn(
ERROR:    Traceback (most recent call last):
   File "/usr/local/lib/python3.11/site-packages/nltk/corpus/util.py", line 84, in __load
   root = nltk.data.find(f"{self.subdir}/{zip_name}")
   File "/usr/local/lib/python3.11/site-packages/nltk/data.py", line 579, in find
   raise LookupError(resource_not_found)
LookupError:
**********************************************************************
Resource wordnet not found.
Please use the NLTK Downloader to obtain the resource:
2024-09-11 10:02:30 
>>> import nltk
>>> nltk.download('wordnet')

For more information see: https://www.nltk.org/data.html
2024-09-11 10:02:30 
Attempted to load corpora/wordnet.zip/wordnet/
2024-09-11 10:02:30 
Searched in:
  - '/root/nltk_data'
  - '/usr/local/nltk_data'
  - '/usr/local/share/nltk_data'
  - '/usr/local/lib/nltk_data'
  - '/usr/share/nltk_data'
  - '/usr/local/share/nltk_data'
  - '/usr/lib/nltk_data'
  - '/usr/local/lib/nltk_data'
**********************************************************************

(I'm not sure what's going on, but this is my 4th submitted issue for pipelines. I'm not trying anything strange: these are the first commands that are run. Are they even tested? Maybe it's a Windows thing.)