chenfei-wu / TaskMatrix

Other
34.54k stars 3.32k forks source link

ValueError: "ConversationBufferMemory" object has no field "buffer" #281

Closed JizhongXia closed 1 year ago

JizhongXia commented 1 year ago

I have successfully configured all the environments, after I use python visual_chatgpt.py --load ImageCaptioning_cpu,Text2Image_cpu to run this program, I get Running on local URL: http://0.0.0.0:1015, then I opened localhost:1015, I successfully entered the page, but when I entered any information, the following error occurred: Traceback (most recent call last): File "C:\ProgramData\anaconda3\lib\site-packages\gradio\routes.py", line 394, in run_predict output = await app.get_blocks().process_api( File "C:\ProgramData\anaconda3\lib\site-packages\gradio\blocks.py", line 1075, in process_api result = await self.call_function( File "C:\ProgramData\anaconda3\lib\site-packages\gradio\blocks.py", line 884, in call_function prediction = await anyio.to_thread.run_sync( File "C:\ProgramData\anaconda3\lib\site-packages\anyio\to_thread.py", line 28, in run_sync return await get_asynclib().run_sync_in_worker_thread(func, args, cancellable=cancellable, File "C:\ProgramData\anaconda3\lib\site-packages\anyio_backends_asyncio.py", line 818, in run_sync_in_worker_thread return await future File "C:\ProgramData\anaconda3\lib\site-packages\anyio_backends_asyncio.py", line 754, in run result = context.run(func, args) File "Z:\开发\开源项目Demo\Github\visual-chatgpt\visual_chatgpt.py", line 1013, in run_text self.agent.memory.buffer = cut_dialogue_history(self.agent.memory.buffer, keep_last_n_words=500) File "pydantic\main.py", line 357, in pydantic.main.BaseModel.setattr ValueError: "ConversationBufferMemory" object has no field "buffer"

Can I know how I need to improve or how I need to make him run?

JizhongXia commented 1 year ago

Oh, I successfully got it running by running pip install langchain==0.0.101