Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix SingleStoreDB (langchain-ai#10534)
After the refactoring langchain-ai#6570, the DistanceStrategy class was moved to another module and this introduced a bug into the SingleStoreDB vector store, as the `DistanceStrategy.EUCLEDIAN_DISTANCE` started to convert into the 'DistanceStrategy.EUCLEDIAN_DISTANCE' string, instead of just 'EUCLEDIAN_DISTANCE' (same for 'DOT_PRODUCT'). In this change, I check the type of the parameter and use `.name` attribute to get the correct object's name. --------- Co-authored-by: Volodymyr Tkachuk <[email protected]>
- Loading branch information