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'

相关推荐
Sirius.z19 小时前
第R6周:LSTM实现糖尿病探索与预测
python
名字还没想好☜20 小时前
Python f-string 进阶:数字格式化、对齐填充、调试 = 号与嵌套表达式
开发语言·数据库·python·字符串格式化·f-string
·薯条大王20 小时前
经济实惠玩云服务器|一台云服务器多人共用,子账号配置教程
java·linux·运维·服务器·汇编·c++·python
Dxy123931021621 小时前
Python 如何使用 MySQL 的事务
python·mysql
一壶浊酒..1 天前
Scrape Webpack练习
开发语言·javascript·webpack
命运之光1 天前
【C语言完整代码】就诊信息管理系统
java·c语言·开发语言
命运之光1 天前
【C语言完整代码】图书管理系统:图书馆场景下的增删改查实战
c语言·开发语言
猿长大人1 天前
C# | Serilog 新手入门
开发语言·c#·.net·log
今儿敲了吗1 天前
Python ——第三方包
笔记·python
麒麟水手1 天前
国产银河麒麟系统开发实录:跑通Streamlit,我踩过的6个坑
python