@ -195,6 +195,8 @@ class Weaviate(VectorStore):
query_obj = self . _client . query . get ( self . _index_name , self . _query_attrs )
query_obj = self . _client . query . get ( self . _index_name , self . _query_attrs )
if kwargs . get ( " where_filter " ) :
if kwargs . get ( " where_filter " ) :
query_obj = query_obj . with_where ( kwargs . get ( " where_filter " ) )
query_obj = query_obj . with_where ( kwargs . get ( " where_filter " ) )
if kwargs . get ( " additional " ) :
query_obj = query_obj . with_additional ( kwargs . get ( " additional " ) )
result = query_obj . with_near_text ( content ) . with_limit ( k ) . do ( )
result = query_obj . with_near_text ( content ) . with_limit ( k ) . do ( )
if " errors " in result :
if " errors " in result :
raise ValueError ( f " Error during query: { result [ ' errors ' ] } " )
raise ValueError ( f " Error during query: { result [ ' errors ' ] } " )
@ -212,6 +214,8 @@ class Weaviate(VectorStore):
query_obj = self . _client . query . get ( self . _index_name , self . _query_attrs )
query_obj = self . _client . query . get ( self . _index_name , self . _query_attrs )
if kwargs . get ( " where_filter " ) :
if kwargs . get ( " where_filter " ) :
query_obj = query_obj . with_where ( kwargs . get ( " where_filter " ) )
query_obj = query_obj . with_where ( kwargs . get ( " where_filter " ) )
if kwargs . get ( " additional " ) :
query_obj = query_obj . with_additional ( kwargs . get ( " additional " ) )
result = query_obj . with_near_vector ( vector ) . with_limit ( k ) . do ( )
result = query_obj . with_near_vector ( vector ) . with_limit ( k ) . do ( )
if " errors " in result :
if " errors " in result :
raise ValueError ( f " Error during query: { result [ ' errors ' ] } " )
raise ValueError ( f " Error during query: { result [ ' errors ' ] } " )