mem0 icon indicating copy to clipboard operation
mem0 copied to clipboard

Use app.db.count() instead of app.count()

Open Lato-Masi opened this issue 2 years ago • 6 comments

🐛 Describe the bug

Following code snippet gives a warning

from embedchain import App
app = App()
app.count()
[root] [WARNING] DEPRECATION WARNING: Please use `app.db.count()` instead of `app.count()`.

Count function counts the number of chunks in the database. We need to update and fix this warning.

Lato-Masi avatar Sep 27 '23 05:09 Lato-Masi

Can I work on this issue?

th-shristi avatar Sep 27 '23 08:09 th-shristi

Can I work on this issue?

go for it, the change is very easy.

Lato-Masi avatar Sep 27 '23 14:09 Lato-Masi

@th-shristi : assigned it to you.

taranjeet avatar Sep 27 '23 16:09 taranjeet

in which file this code exist? @taranjeet can you drop the path?

th-shristi avatar Sep 30 '23 20:09 th-shristi

Hey @th-shristi , so you will have to remove the function count() located in embedchain/embedchain.py. You will have to make sure that everything works after removing this function - all tests, code should work.

taranjeet avatar Oct 01 '23 00:10 taranjeet

@taranjeet have to remove the whole count function? Instead of need to do some other changes or it's done?

th-shristi avatar Oct 01 '23 18:10 th-shristi

Could you assign it to me for the record as it has now been solved? Thanks!

sssserrano avatar Jan 05 '24 12:01 sssserrano

@sandrasgg thanks for your contribution. Assigned it to you as well.

I would love to chat to know more about you. See if you can find some time here: https://embedchain.ai/cal

taranjeet avatar Jan 05 '24 13:01 taranjeet