xinference transformer形式 目前不支持qwen的function call 之前老版本是支持的
System Info / 系統信息
xinference transformer形式 目前不支持qwen的function call 之前老版本是支持的 报错:'str' object has no attribute 'get'
Running Xinference with Docker? / 是否使用 Docker 运行 Xinfernece?
- [ ] docker / docker
- [x] pip install / 通过 pip install 安装
- [ ] installation from source / 从源码安装
Version info / 版本信息
xinference 1.4.0
The command used to start Xinference / 用以启动 xinference 的命令
cd /data/galileo/models/xinference . xinference/bin/activate xinference-local --host 0.0.0.0 --port 8888
Reproduction / 复现过程
正常通过langchain prompt转化结构
__doc_abstract_template = """你是一名负责写文章总结摘要(Summary)的工作者。
工作职责要求
将给的文章进行总结,总结要突出文章的主题以及中心思想;总结内容要求层次清晰;总结内容要涉及时间、主要人物、发生的事件、事件的结果
限制
1.总结的长度必须是至多包含3个句子,总字数不超过150字
2.使用给定文章的语言进行总结,如果无法判定则默认使用:中文
3.直接给出摘要文字,不要出现任何推理、以及“总结如下:”等字样
4.总结的内容不能有重复的语句
提供的文章标题:{title}
提供的文章上下文内容:
{document}
注意
1.总结的口吻应以第一人称的口吻进行撰写;并以叙述事件的口吻进行撰写;
2.使用短小精炼的句子,让核心观点一目了然,避免复杂的表达让读者失去耐心;
3.开篇不绕弯子,直接切入文章的核心话题,抓住读者的注意力;
4.摘要内容精简,避免不必要的赘述,保持每句话都有意义;
5.摘要层层递进,逻辑清晰,逐步引导读者进入更深的思考
{format_instructions}
总结摘要:\n
"""
parser = PydanticOutputParser(pydantic_object=Summary)
prompt = PromptTemplate.from_template(template=__doc_abstract_template, partial_variables={
"format_instructions": parser.get_format_instructions()})
self.abstract_chain = {"document": itemgetter("document"), "title": itemgetter("title")} | prompt | llm | parser
调用代码
summary: Summary = await self.generate_abstract_async(title=galileo_spider.get("Title"),
document=galileo_spider.get("Content"))
Expected behavior / 期待表现
summary结构化代码,目前报错,但是如果使用vllm结果正常,不过之前老版本是支持的transformer
@codingl2k1 Could you look at this?
This issue is stale because it has been open for 7 days with no activity.
This issue is stale because it has been open for 7 days with no activity.
@codingl2k1 有结果了么? 什么原因
This issue is stale because it has been open for 7 days with no activity.
@qinxuye 能帮忙看看么?
@amumu96 tool calls 的问题统一看下。
This issue is stale because it has been open for 7 days with no activity.
@qinxuye 有结论了么?
@qinxuye 是否需要继续升级呢
预计要等下个版本。
This issue is stale because it has been open for 7 days with no activity.
This issue was closed because it has been inactive for 5 days since being marked as stale.