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'

相关推荐
Java后端的Ai之路1 小时前
RAG 还是 Agent 自主检索?Claude Code 删掉向量库之后,我把选型讲透了
开发语言·人工智能·prompt·agent·rag
starzy19901 小时前
深入理解Scala高阶函数:函数式编程核心
开发语言·scala
qq_158895411114 小时前
AI 音乐生成完成后,音频 URL 为什么会过期?一套可恢复的交付方案
python·api·ai音乐
Warson_L6 小时前
高性能架构设计
python·go
databook6 小时前
新数据到手,先跑哪几步检查
python·数据分析
czq_26867194877 小时前
Python打卡第46天
开发语言·python
Flynt8 小时前
日涨4000星的OSINT工具,我拿Linus的用户名和一个随机字符串实测了一遍
python·安全
Evand J9 小时前
【MATLAB例程介绍】(17)永磁同步电机(PMSM)基于自适应无迹卡尔曼滤波(AUKF)的电流噪声在线估计。测量噪声协方差自适应与转速估计对比仿真
开发语言·matlab·卡尔曼滤波·无迹卡尔曼滤波·pmsm·电机滤波
BaiPeter10 小时前
ZPL文件预览
开发语言·c++
曲径海盗11 小时前
【Python 学习第 53 天】列表基础
python·学习笔记·编程入门