Error Handling (Empty Database)
We have to come up with a way to handle errors.
The most common issue is
retrieve_from_database
content = result_formatted[0][0].page_content
Discord messages:
- https://discord.com/channels/1121119078191480945/1121119078858358846/1125847354281558036
- https://discord.com/channels/1121119078191480945/1121119078858358846/1125841669640700065
will add my thoughts on this in sometime.
First of all, I agree that we can't leave it as it is. A index error in a line with two lists is as indescriptive as it's going to get.
I've helped plenty of people with this error.
In 90% of the cases it was a that somehow, the database got wiped and it was just empty. For this we should see if Chroma has a count function and raise a descriptive, custom error as soon as possible.
If people still have problems, we should add different descriptive, custom errors for the different scenarios we encounter.
Blindly escaping should be avoided at all costs! No one likes errors, but they don't go away if you ignore them! That's a general wisdom for life 😄
Closing this, because I guess thinking about it again, it should be possible to query an empty database, might be better for dry runs.