mirror of
https://github.com/open-webui/pipelines
synced 2025-05-13 09:00:53 +00:00
cleanup: MLX valves
This commit is contained in:
parent
c44fb71930
commit
f7ac26be13
@ -20,12 +20,12 @@ import psutil
|
|||||||
|
|
||||||
class Pipeline:
|
class Pipeline:
|
||||||
class Valves(BaseModel):
|
class Valves(BaseModel):
|
||||||
MLX_STOP: str = "<|start_header_id|>,<|end_header_id|>,<|eot_id|>"
|
MLX_MODEL_FILTER: str = "mlx-community"
|
||||||
HUGGINGFACE_TOKEN: str = ""
|
|
||||||
MLX_MODEL_PATTERN: str = "mlx-community"
|
|
||||||
MLX_DEFAULT_MODEL: str = "mlx-community/Meta-Llama-3-8B-Instruct-8bit"
|
MLX_DEFAULT_MODEL: str = "mlx-community/Meta-Llama-3-8B-Instruct-8bit"
|
||||||
|
MLX_STOP: str = "<|start_header_id|>,<|end_header_id|>,<|eot_id|>"
|
||||||
MLX_CHAT_TEMPLATE: str = ""
|
MLX_CHAT_TEMPLATE: str = ""
|
||||||
MLX_USE_DEFAULT_CHAT_TEMPLATE: bool = False
|
MLX_USE_DEFAULT_CHAT_TEMPLATE: bool = False
|
||||||
|
HUGGINGFACE_TOKEN: str = ""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
# Pipeline identification
|
# Pipeline identification
|
||||||
@ -61,7 +61,7 @@ class Pipeline:
|
|||||||
cmd = [
|
cmd = [
|
||||||
'mlx_lm.manage',
|
'mlx_lm.manage',
|
||||||
'--scan',
|
'--scan',
|
||||||
'--pattern', self.valves.MLX_MODEL_PATTERN,
|
'--pattern', self.valves.MLX_MODEL_FILTER,
|
||||||
]
|
]
|
||||||
result = subprocess.run(cmd, capture_output=True, text=True)
|
result = subprocess.run(cmd, capture_output=True, text=True)
|
||||||
lines = result.stdout.strip().split('\n')
|
lines = result.stdout.strip().split('\n')
|
||||||
|
Loading…
Reference in New Issue
Block a user