Fix: Correct an issue related to clearing the Faiss index in Flask4ModelCache_demo #35
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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!