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'

相关推荐
Andy11 分钟前
Python基础语法4
开发语言·python
但要及时清醒16 分钟前
ArrayList和LinkedList
java·开发语言
孚亭32 分钟前
Swift添加字体到项目中
开发语言·ios·swift
hweiyu0036 分钟前
Go、DevOps运维开发实战(视频教程)
开发语言·golang·运维开发
mm-q29152227291 小时前
Python+Requests零基础系统掌握接口自动化测试
开发语言·python
星星火柴9361 小时前
笔记 | C++面向对象高级开发
开发语言·c++·笔记·学习
码界奇点1 小时前
Rust 性能优化全流程从 flamegraph 定位瓶颈到 unsafe 与 SIMD 加速响应快
开发语言·性能优化·rust·simulated annealing
电院工程师2 小时前
SIMON64/128算法Verilog流水线实现(附Python实现)
python·嵌入式硬件·算法·密码学
丛雨要玩游戏2 小时前
字符函数和字符串函数
c语言·开发语言·算法