mirror of
https://github.com/open-webui/pipelines
synced 2025-06-26 18:15:58 +00:00
feat: allow inlet, outlet for pipes
This commit is contained in:
10
main.py
10
main.py
@@ -470,10 +470,7 @@ async def update_valves(pipeline_id: str, form_data: dict):
|
||||
@app.post("/v1/{pipeline_id}/filter/inlet")
|
||||
@app.post("/{pipeline_id}/filter/inlet")
|
||||
async def filter_inlet(pipeline_id: str, form_data: FilterForm):
|
||||
if (
|
||||
pipeline_id not in app.state.PIPELINES
|
||||
or app.state.PIPELINES[pipeline_id].get("type", "pipe") != "filter"
|
||||
):
|
||||
if pipeline_id not in app.state.PIPELINES:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_404_NOT_FOUND,
|
||||
detail=f"Filter {pipeline_id} not found",
|
||||
@@ -498,10 +495,7 @@ async def filter_inlet(pipeline_id: str, form_data: FilterForm):
|
||||
@app.post("/v1/{pipeline_id}/filter/outlet")
|
||||
@app.post("/{pipeline_id}/filter/outlet")
|
||||
async def filter_outlet(pipeline_id: str, form_data: FilterForm):
|
||||
if (
|
||||
pipeline_id not in app.state.PIPELINES
|
||||
or app.state.PIPELINES[pipeline_id].get("type", "pipe") != "filter"
|
||||
):
|
||||
if pipeline_id not in app.state.PIPELINES:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_404_NOT_FOUND,
|
||||
detail=f"Filter {pipeline_id} not found",
|
||||
|
||||
Reference in New Issue
Block a user