caretdev / langchain-iris

MIT License
2 stars 2 forks source link

Support for VECTOR_DOT_PRODUCT #1

Closed isc-patrick closed 5 months ago

isc-patrick commented 5 months ago

I see that some support for IRIS vector search was added in v0.1.0, https://github.com/caretdev/langchain-iris/releases/tag/v0.1.0, but I do not see any reference to the VECTOR_DOT_PRODUCT function (https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=RSQL_vectordotproduct). Is this function supported?

daimor commented 5 months ago

yes, supported

isc-patrick commented 5 months ago

If I try and use 'dot' or 'l2' in the for distance_strategy in IRISVector.from_documents, I get an error.

for 'dot': AttributeError: Neither 'Column' object nor 'comparator_factory' object has an attribute 'DOT_product'

for 'l2': ValueError: Got unexpected value for distance: l2. Should be one of l2, cosine, dot.