open-webui / pipelines

Pipelines: Versatile, UI-Agnostic OpenAI-Compatible Plugin Framework
MIT License
1.03k stars 321 forks source link

ERROR while uploading text_to_sql_pipeline from the repo #278

Closed IAmAnubhavSaini closed 1 month ago

IAmAnubhavSaini commented 2 months ago

Here are the docker logs

WARNING:root:No Pipeline class found in text_to_sql_pipeline
on_shutdown:python_code_pipeline
Installing requirement: llama_index
Installing requirement: sqlalchemy
Installing requirement: psycopg2-binary
Loaded module: text_to_sql_pipeline
Error loading module: text_to_sql_pipeline
1 validation error for Valves
DB_PORT
  Input should be a valid string [type=string_type, input_value=5432, input_type=int]
    For further information visit https://errors.pydantic.dev/2.7/v/string_type
Loaded module: python_code_pipeline
on_startup:python_code_pipeline

Note: DB_PORT Input should be a valid string [type=string_type, input_value=5432, input_type=int]

0xThresh commented 1 month ago

Hey @IAmAnubhavSaini, I wrote this pipeline and believe the error you're seeing is because an old version of this didn't correctly cast the default port to a string instead of an int. I'd encourage you to try the function I recently wrote instead, it's the same as the text_to_sql_pipeline but run on an Open WebUI instance instead of the Pipelines server now, and I believe I've resolved this issue with it. Feel free to ping me if you have any trouble.

Function code: https://openwebui.com/f/0xthresh/text_to_sql_rag_pipe/