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'

相关推荐
朱永博8 分钟前
使用Onnruntime实现Padim/Patchcore推理
开发语言·c#
前端H10 分钟前
Biome & Rolldown:Rust 工具链接管前端基建
开发语言·前端·rust
天天进步201520 分钟前
UI-TARS 源码解析 #4:UI-TARS 与传统 RPA 的区别:为什么它不是简单的坐标点击脚本?
开发语言
运维行者_25 分钟前
广域网性能监控:分布式IT架构下的链路质量保障
开发语言·网络·分布式·后端·架构·数据库架构
梅雅达编程笔记26 分钟前
零基础学 Python 第7章 | 字典 dict:键值对存储
开发语言·python·beautifulsoup·numpy·pandas
heroboyluck27 分钟前
AI工程师第四课 - 深度学习入门
人工智能·python·深度学习·llama
灯澜忆梦30 分钟前
GO---map函数
开发语言·前端·后端·golang
alicema11111 小时前
BRAIN 研究顾问(Research Consultant)兼职
python·量化
元Y亨H1 小时前
Python,单引号和双引号有何区别
python