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'

相关推荐
CTA终结者1 分钟前
先用小策略练清条件和动作
人工智能·python
Bruce_Liuxiaowei13 分钟前
从零到可运行:基于 Vue3 + FastAPI + DeepSeek-V3 的 AI 英语单词学习系统全栈实战
人工智能·python·学习·fastapi·全栈·智能体
ValhallaCoder24 分钟前
Leetcode-hot100(2026.08.17)
python·算法·leetcode
IT爱学堂28 分钟前
尚硅谷Java+AI大模型应用开发革新版本 2025年3月
java·开发语言·人工智能
W_3260029 分钟前
Python-OpenCV图像像素与通道:通道拆分合并、深浅拷贝
图像处理·人工智能·python·opencv·机器学习
C++ 老炮儿的技术栈32 分钟前
Qt5.9.1 Windows 完整开发环境搭建流程
开发语言·c++·windows·qt·编辑器·代码化
xcLeigh37 分钟前
Go入门:无类型常量与类型常量的区别
服务器·开发语言·golang
泡沫冰@43 分钟前
GO 语言基础
开发语言·算法·golang
让你三行代码QAQ1 小时前
AI大模型开发核心名词速览
python