Closed powerli2002 closed 6 months ago
We've merged your commit that fixes the faiss database clearing issue in flask4modelcache_demo.py. Thank you for your keen observation and subsequent fix. Additionally, we find sqlite does not correctly return the number of rows deleted. we have made some adjustments and fixes. Welcome to join CodeFuse AI open-source initiative.
Fixed an issue where clearing faiss database was invalid when using flask4modelcache_demo.py
When I run flask4modelcache_demo.py, I found that the Cache-Clearing method mentioned in the documentation cannot clear the Faiss index and returns an error message. Upon inspecting the code, I discovered that this logic was not implemented. Therefore, this pull request adds a method to reset the index.
Additionally, I noticed that rebuild_col() only works properly when it has no return value. I'm unsure if this is intended behavior, so I made minimal changes to achieve the desired functionality without altering it.
I'm honored to be involved in your open-source project. Please feel free to contact me if there are any issues with my changes. I'm very eager to join the open-source initiative of CodeFuse AI!