Skip to content

Commit

Permalink
Merge pull request #2 from bdeboe/main
Browse files Browse the repository at this point in the history
  • Loading branch information
daimor authored May 8, 2024
2 parents a791f1b + 9ed4937 commit 742b488
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion langchain_iris/vectorstores.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,15 @@ def __init__(
self.logger = logger or logging.getLogger(__name__)
self.override_relevance_score_fn = relevance_score_fn
self.engine_args = engine_args or {}
self._conn = connection if connection else self.connect()
if connection:
self._conn = connection
try:
if connection.dialect.supports_vectors:
self.native_vector = True
except: # noqa
pass
else:
self._conn = self.connect()

self.__post_init__()

Expand Down

0 comments on commit 742b488

Please sign in to comment.