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'

相关推荐
段一凡-华北理工大学7 分钟前
大模型应用开发 100 天:Python + LLM 从入门到精通 day26~Prompt 调试与优化——A/B 测试与效果评估
windows·python·大模型·prompt·智能体·提示词工程·高炉智能化
Minecraft红客8 分钟前
以撒的结合
python·游戏·电脑·娱乐
Circ.20 分钟前
Python 调试 Litellm 本地大模型接口:模型列表与对话接口实操踩坑记录
开发语言·python
风早爽太1 小时前
用 ‌Render‌ 快速部署网站和常见问题解决
python·fastapi
现任明教教主~2 小时前
Thinkphp站群蜘蛛池SaaS系统YanyvSEO含多用户/积分/六大引擎计费/易支付对接
java·开发语言·spring
李航19832 小时前
给自己的图形引擎,配上了AI渲染,做设计真是太方便了
人工智能·python·计算机视觉·ai·ai编程
L@ncor2 小时前
第六章 框架开发实践 · 学习笔记(AutoGen / AgentScope / CAMEL / LangGraph)
python·框架·autogen·langgraph·agentscope
Zhou1411362 小时前
SpringSecurity_02_授权与高级功能
开发语言·python
码匠许师傅3 小时前
【C++三方组件】cpp-httplib:一个头文件起 HTTP 服务
开发语言·c++·http