caretdev / langchain-iris

MIT License
2 stars 2 forks source link

ensure native_vector is set when seeding a connection #2

Closed bdeboe closed 4 months ago

bdeboe commented 4 months ago

When providing a connection directly to the IRISVector() constructor, rather than the URL to create one, we're not verifying if the database we're connecting to supports the native vector datatype, as that check is only performed in connect().

The change in this PR is trivially fixing this inside IRISVector() because I'm not familiar with other uses of the connection, but either moving the check to a separate on_connect() method or changing the native_vectors property to dynamically check the connection rather than copy that state may be preferable long term.