chainlit icon indicating copy to clipboard operation
chainlit copied to clipboard

It consumes a significant amount of computer resources.

Open wupengfei0904 opened this issue 2 years ago • 11 comments

I start Chainlit, the CPU usage reaches 50%, and the memory gradually increases by 5GB. My computer is equipped with an i7 12700 processor and 32GB of RAM. When I close the program, approximately 6GB of memory is released.

wupengfei0904 avatar Jun 09 '23 02:06 wupengfei0904

This is unexpected. Are you running a default example or a heavy task like running a local LLM?

willydouhard avatar Jun 09 '23 08:06 willydouhard

I just reproduced it again. My environment is Win11 + Python 3.11. I used the example from the documentation, and after running it, both the CPU and RAM suddenly spiked. 微信截图_2023060916432
微信截图_20230609164333
1 微信截图_20230609164441 微信截图_20230609164502

wupengfei0904 avatar Jun 09 '23 08:06 wupengfei0904

Okay, could you try with the wheel provided in this PR? https://github.com/Chainlit/chainlit/pull/40 you can just pip install it and run chainlit hello to see if you see the same resource consumption.

willydouhard avatar Jun 09 '23 08:06 willydouhard

Hello, author. I have resolved the issue using version 0.3.0 of Chainlit. Both the CPU and RAM are stable now, and there are no spikes.

wupengfei0904 avatar Jun 09 '23 09:06 wupengfei0904

Amazing! this version is not yet merged (soon hopefully) and the docs are not updated to reflect the changes. So be careful with that while we update everything

willydouhard avatar Jun 09 '23 09:06 willydouhard

SurachaiJaisan avatar Jun 09 '23 09:06 SurachaiJaisan

O

SurachaiJaisan avatar Jun 09 '23 09:06 SurachaiJaisan

Pjv

SurachaiJaisan avatar Jun 09 '23 09:06 SurachaiJaisan

ptc

SurachaiJaisan avatar Jun 09 '23 09:06 SurachaiJaisan

Hello, author. May I ask when the official release of FastAPI version will be available? Additionally, have you considered supporting the ChatGPT standard plugins, such as ChatGPT UI, which allows for installing and selecting the desired plugins for use?

wupengfei0904 avatar Jun 10 '23 04:06 wupengfei0904

I hope to merge it early next week if everything is ok. We thought about the plugins, our first try was with the LangChain integration: https://github.com/Chainlit/cookbook/tree/main/langchain-aiplugins but not every plugin is compatible. Plus not all the plugins are public.

willydouhard avatar Jun 10 '23 09:06 willydouhard

Should be fixed in the latest version 0.3.0. Please note that it contains breaking changes. We prepared a migration guide to make it easy for everyone.

willydouhard avatar Jun 13 '23 16:06 willydouhard