AttributeError: 'Chat' object has no attribute 'features'
在进行本小节测试的时候,发生如下报错:AttributeError: 'Chat' object has no attribute 'features'

Traceback (most recent call last): File "D:\Envs\llmops\lib\site-packages\werkzeug\wsgi.py", line 256, in __next__ return self._next() File "D:\Envs\llmops\lib\site-packages\werkzeug\wrappers\response.py", line 32, in _iter_encoded for item in iterable: File "D:\Envs\llmops\lib\site-packages\flask\helpers.py", line 125, in generator yield from gen File "E:\Code\llmops\api\pkg\response\response.py", line 93, in generate yield from response File "E:\Code\llmops\api\internal\service\app_service.py", line 203, in debug_chat agent_class = FunctionCallAgent if ModelFeature.TOOL_CALL in llm.features else ReACTAgent AttributeError: 'Chat' object has no attribute 'features'
发现deepseek Chat在进行实例化后features属性到model_kwargs中去了:

而能够成功运行的moonshot的features属性是正常的,并没有到model_kwargs中去:

如下是两个模型的Chat定义:

请老师帮忙看看是哪里的问题吧
7
收起
正在回答 回答被采纳积分+1
AI Agent 全栈开发工程师
- 参与学习 500 人
- 解答问题 404 个
全流程打造你自己的(Coze/Dify)低代码智能体开发平台;2025年入行正当时,企业急需,人才稀缺,竞争小;无论入行还是转行,首选口碑好课,门槛低、成长高
了解课程


恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星