试用碰到问题
#756
Replies: 1 comment 1 reply
-
请问你使用的formatter是DeepSeekChatFormatter吗,如果是调用deepseek接口,那么需要使用DeepSeekChatFormatter或者DeepSeekMultiAgentFormatter |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
用给的代码试用,只把ReActAgent的model传参从_dashscope_model换成了_openai_model掉deepseek接口,然后出现bad request问题,定位发现是memory里添加的一些字段非法直接用来构造prompt导致的,出问题的代码是这 prompt = await self.formatter.format(
msgs=[
Msg("system", self.sys_prompt, "system"),
# *await self.memory.get_memory(),
*[msg for msg in await self.memory.get_memory()
if isinstance(msg.content, str)],
],
)。
也就是这里的memory的content里有的字段是列表,我把列表过滤了就能用了,这是我用openai调deepseek接口才会有的问题还是什么其他情况。同时也会把role是tool的消息也重新返回给大模型,这是预期的吗,我以为是把工具返回放进user的content里。
Beta Was this translation helpful? Give feedback.
All reactions