Xinference 常见bug: "detail": "Invalid input. Please specify the prompt."

"detail": "Invalid input. Please specify the prompt."

if not messages or messages[-1].get("role") not in ["user", "system", "tool"]:

raise HTTPException(

status_code=400, detail="Invalid input. Please specify the prompt."

)https://openi.pcl.ac.cn/o3sky/inference/src/tag/v0.11.2.post1/xinference/api/restful_api.py:1281

我方法是:

if len(messages)>2:

messages[-1]['role']='system'

相关推荐
秦苒&31 分钟前
【C语言指针二】从入门到通透:核心知识点全梳理(野指针,assert断言,指针的使用和传址调用,数组名的理解和使用指针反访问数组)
c语言·开发语言
Y1rong5 小时前
C++ QT之记事本
开发语言·qt
吴佳浩7 小时前
大模型量化部署终极指南:让700亿参数的AI跑进你的显卡
人工智能·python·gpu
diegoXie8 小时前
Python / R 向量顺序分割与跨步分割
开发语言·python·r语言
程序员小白条8 小时前
0经验如何找实习?
java·开发语言·数据结构·数据库·链表
七牛云行业应用8 小时前
解决OSError: No space left... 给DeepSeek Agent装上无限云硬盘
python·架构设计·七牛云·deepseek·agent开发
liulilittle8 小时前
C++ 浮点数封装。
linux·服务器·开发语言·前端·网络·数据库·c++
BoBoZz199 小时前
CutWithScalars根据标量利用vtkContourFilter得到等值线
python·vtk·图形渲染·图形处理
失散139 小时前
Python——1 概述
开发语言·python
萧鼎9 小时前
Python 图像哈希库 imagehash——从原理到实践
开发语言·python·哈希算法