QwenLM / Qwen-Agent

Agent framework and applications built upon Qwen>=2.0, featuring Function Calling, Code Interpreter, RAG, and Chrome extension.
https://pypi.org/project/qwen-agent/
Other
3.3k stars 324 forks source link

TypeError: Memory.__init__() got an unexpected keyword argument 'cookie' #272

Open seanzhang-zhichen opened 3 months ago

seanzhang-zhichen commented 3 months ago

我的代码:

self.bot = ReActChat(llm=self.llm_cfg, function_list=self.tools, name="xxxx", description="xxxxx", cookie=self.cookie)

追了一下源码,发现Memory类没有支持kwargs,建议更新下,不然kwargs就是个摆设 image

JianxinMa commented 3 months ago

我粗看了下,init是漏了 kwargs。但是 agent.run 的 kwargs 会传给 memory.run 的 kwargs。

当时设计的时候,memory.init 是通过 rag_cfg 接收额外参数的,我回头看看 init 是否有必要增加kwargs。