chroma-core / chroma

the AI-native open-source embedding database
https://www.trychroma.com/
Apache License 2.0
15.45k stars 1.3k forks source link

[CLN]: Improve maybe_cast_one_to_many function with types for Document, Uri, and ID to be more robust #2734

Open spikechroma opened 2 months ago

spikechroma commented 2 months ago

Describe the problem

https://github.com/chroma-core/chroma/pull/2686#discussion_r1735031927

Describe the proposed solution

Be more explicit with types for Document, Uri and ID instead of using a generic isinstance(target, str)

Alternatives considered

No response

Importance

nice to have

Additional Information

No response