voxel51 / voxelgpt

AI assistant that can query visual datasets, search the FiftyOne docs, and answer general computer vision questions
https://gpt.fiftyone.ai
Apache License 2.0
234 stars 17 forks source link

LangChain Upgrade #103

Closed jacobmarks closed 1 year ago

jacobmarks commented 1 year ago

LangChain upgraded their BaseRetriever class to Pydantic, which made our child class FiftyOneDocsRetriever throw an error when trying to add custom attributes. The fix was to just get rid of the inheritance. FiftyOneDocsRetriever still implements the get_relevant_documents() method as before.

Test that now works:

from voxelgpt import ask_voxelgpt
ask_voxelgpt("does fiftyone support 3d bounding boxes?")

Also verified that CV queries and basic dataset queries still work.

Test conducted with langchain==0.0.179 (old version) and langchain==0.0.288 (most recent), plus some intermediate versions, and all work.