File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
camel/storages/vectordb_storages Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -113,18 +113,18 @@ def __init__(
113113 # Create vector index
114114 index_params : IndexParams = IndexParams ()
115115 index_params .add_index (
116- IndexParam (
117- index_name = "embedding_idx" ,
118- field_name = "embedding" ,
119- distance = self .distance ,
120- type = "hnsw" ,
121- m = 16 ,
122- ef_construction = 256 ,
123- )
116+ field_name = "embedding" ,
117+ index_type = "hnsw" ,
118+ index_name = "embedding_idx" ,
119+ distance = self .distance ,
120+ m = 16 ,
121+ ef_construction = 256 ,
124122 )
125123
124+ # Get the first index parameter
125+ first_index_param = next (iter (index_params ))
126126 self ._client .create_vidx_with_vec_index_param (
127- table_name = self .table_name , vidx_param = index_params . params [ 0 ]
127+ table_name = self .table_name , vidx_param = first_index_param
128128 )
129129
130130 logger .info (f"Created table { self .table_name } with vector index" )
You can’t perform that action at this time.
0 commit comments