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'

相关推荐
小熊Coding14 分钟前
童年游戏冒险岛(Python版本)
python·游戏·pygame
白夜111721 分钟前
C++(标签派发 Tag Dispatching)
开发语言·c++·笔记·算法
WJ.Polar33 分钟前
Scapy基本应用
linux·运维·网络·python
CSCN新手听安1 小时前
【Qt】Qt窗口(六)QMessageBox消息对话框的使用
开发语言·c++·qt
H_unique1 小时前
LangChain:调用工具Ⅲ
python·langchain
醉舞经阁半卷书11 小时前
深入掌握LangChain
python·langchain
CDN3602 小时前
[硬核] 你的DNS正在“裸奔”?用Python手撕DNS劫持与隧道检测逻辑
开发语言·网络·python
froginwe112 小时前
jQuery 添加元素
开发语言
深念Y2 小时前
踩坑实录:把 Windows 默认 PowerShell 换成 7.x 到底有多坑?一条龙解决指南
windows·乱码·bug·控制台·powershell·管道·流式
zhangfeng11332 小时前
PHP 语法检查命令 php -l “$file“ > /dev/null 2>&1;
开发语言·php