当前位置: 首页 > news >正文

open-webui pipelines报404, ‘Filter pipeline.exporter not found‘

文章目录

  • pipeline报错
  • 原因
  • 解决

pipeline报错

open-webui几次更新,但始终没更新pipelines,也有很长一段时间没跑pipeline,今天想重新做一个新功能,再跑pipeline,竟然报错了:

  1. 页面上的错:
    在这里插入图片描述
  2. 后台的错:

    INFO: 192.168.216.113:13879 - “POST /pipeline.exporter/filter/inlet HTTP/1.1” 404 Not Found

原因

网上也只找到一两个人遇到这样的错,更没有人解决。初看这问题,真是莫名其妙。后面终于从后台的错中的url路径入手,找到了关键代码:
pipelines/main.py

@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:raise HTTPException(status_code=status.HTTP_404_NOT_FOUND,detail=f"Filter {pipeline_id} not found",)

原来是新版本的open webui在传pipeline_id,会额外加上pipeline.前缀,所以就找不到对应的pipeline,从而报404错。

解决

因为懒得再去open-webui找相应的传参代码进行修改了,所以就直接在pipeline/main.py中修改,关键部分如下:

@app.post("/v1/{pipeline_id}/filter/inlet")
@app.post("/{pipeline_id}/filter/inlet")
async def filter_inlet(pipeline_id: str, form_data: FilterForm):pipeline_id = pipeline_id.split(".")[-1]  # 增加print(pipeline_id)if pipeline_id not in app.state.PIPELINES:raise HTTPException(status_code=status.HTTP_404_NOT_FOUND,detail=f"Filter {pipeline_id} not found",)@app.post("/v1/{pipeline_id}/filter/outlet")
@app.post("/{pipeline_id}/filter/outlet")
async def filter_outlet(pipeline_id: str, form_data: FilterForm):pipeline_id = pipeline_id.split(".")[-1] # 增加if pipeline_id not in app.state.PIPELINES:raise HTTPException(status_code=status.HTTP_404_NOT_FOUND,detail=f"Filter {pipeline_id} not found",)
http://www.dtcms.com/a/314437.html

相关文章:

  • 【测试工程思考】云平台测试可重用性和场景覆盖度的平衡术
  • 遮天(太古篇)
  • windows内核研究(软件调试-软件断点)
  • [QMT量化交易小白入门]-七十六、从tick数据中获取高频交易的量价背离信号
  • Java开发时出现的问题---语言特性与基础机制陷阱
  • 使用AI IDE编程,如Cursor
  • 小迪安全v2023学习笔记(五十一讲)—— 持续更新中
  • Ubuntu 下编译 SQLCipher 4.8.0
  • yolo实现基于深度学习的龋齿检测系统pyqt
  • Java 发送 HTTP POST请求教程
  • 回归预测 | MATLAB实现BP神经网络多输入单输出回归预测+SHAP可解释分析
  • 基于Matlab的聚类彩色图像分割系统
  • 基于MATLAB实现的心电图自动诊断系统
  • 各种信号分解、模态分解方法合集【MATLAB实现】
  • 链表问题解决分析框架
  • python与C++
  • 【RH124知识点问答题】第7章 控制对文件的访问
  • 【秋招笔试】2025.08.03虾皮秋招笔试-第一题
  • 芯片行业中的EDA(电子设计自动化)是什么?
  • 房屋租赁小程序租房小程序房产信息发布系统房屋租赁微信小程序源码
  • 用户管理——配置文件和命令
  • 探索机器学习在医疗领域的应用与挑战
  • Visual Studio 2022安装与快捷键全攻略
  • AI产品经理面试宝典第61天:AI产品体验、数据安全与架构实战解析
  • Linux中netstat详细使用指南
  • 开源的现代数据探索和可视化平台:Apache Superset 架构组件和安装方式 Kubernetes Docker Compose PyPI
  • 服务器突然之间特别卡,什么原因?
  • 为什么要烧录固件?——从生产到运维的全流程解析
  • k8s学习
  • 佚名运维训练营-第1天