mirror of
https://github.com/open-webui/pipelines
synced 2025-05-11 08:01:08 +00:00
fix(undefined-const): hotfix for missing constants; hazarding guess from context but breaks build
This commit is contained in:
parent
b82442e03e
commit
ef52d54255
11
config.py
11
config.py
@ -1,5 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
|
import logging
|
||||||
####################################
|
####################################
|
||||||
# Load .env file
|
# Load .env file
|
||||||
####################################
|
####################################
|
||||||
@ -11,5 +11,14 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
print("dotenv not installed, skipping...")
|
print("dotenv not installed, skipping...")
|
||||||
|
|
||||||
|
# Define log levels dictionary
|
||||||
|
LOG_LEVELS = {
|
||||||
|
'DEBUG': logging.DEBUG,
|
||||||
|
'INFO': logging.INFO,
|
||||||
|
'WARNING': logging.WARNING,
|
||||||
|
'ERROR': logging.ERROR,
|
||||||
|
'CRITICAL': logging.CRITICAL
|
||||||
|
}
|
||||||
|
|
||||||
API_KEY = os.getenv("PIPELINES_API_KEY", "0p3n-w3bu!")
|
API_KEY = os.getenv("PIPELINES_API_KEY", "0p3n-w3bu!")
|
||||||
PIPELINES_DIR = os.getenv("PIPELINES_DIR", "./pipelines")
|
PIPELINES_DIR = os.getenv("PIPELINES_DIR", "./pipelines")
|
||||||
|
2
main.py
2
main.py
@ -29,7 +29,7 @@ import sys
|
|||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
|
|
||||||
from config import API_KEY, PIPELINES_DIR
|
from config import API_KEY, PIPELINES_DIR, LOG_LEVELS
|
||||||
|
|
||||||
if not os.path.exists(PIPELINES_DIR):
|
if not os.path.exists(PIPELINES_DIR):
|
||||||
os.makedirs(PIPELINES_DIR)
|
os.makedirs(PIPELINES_DIR)
|
||||||
|
Loading…
Reference in New Issue
Block a user