phidata icon indicating copy to clipboard operation
phidata copied to clipboard

chromadb implementation w.i.p

Open hoxsec opened this issue 9 months ago • 6 comments

new file:   phi/vectordb/chromadb/chromadb.py

hoxsec avatar Apr 28 '24 08:04 hoxsec

can we collaborate on this? @hoxsec

Hk669 avatar Apr 29 '24 14:04 Hk669

can we collaborate on this? @hoxsec

Ofcourse, go ahead.

hoxsec avatar Apr 29 '24 14:04 hoxsec

can you share me information on what you are working on actually?

Hk669 avatar Apr 29 '24 19:04 Hk669

Problem Description

I encountered an error related to type hinting with the chromadb.Client in a property decorator. The error message was:

error: Function "chromadb.Client" is not valid as a type [valid-type]

This issue prevented the mypy unit tests from passing, as the type hint was not recognized properly.

Do you have a solution?

hoxsec avatar Apr 29 '24 19:04 hoxsec

that's because you are returning the chromadb.Client() , instead create a new type for the chromadb.Client().

chromaClient = Type[chromaeb.Client()]

this should work. @hoxsec

Hk669 avatar Apr 30 '24 02:04 Hk669

Thanks for this @Hk669 and @hoxsec, happy to review when ready :)

ashpreetbedi avatar Apr 30 '24 23:04 ashpreetbedi