File tree Expand file tree Collapse file tree 3 files changed +3
-18
lines changed
knowledge_bases/database_adapters Expand file tree Collapse file tree 3 files changed +3
-18
lines changed Original file line number Diff line number Diff line change @@ -44,23 +44,8 @@ def wipe_database(self):
4444
4545 def create_vector_index (self ):
4646 metric_mapping = {"cosine" : "cos" , "euclidean" : "l2sq" }
47-
4847 metric = metric_mapping [self .metric ]
4948
50- query = "\n " .join (
51- [
52- "CREATE VECTOR INDEX entity " ,
53- "ON :Entity(embedding)" ,
54- "WITH CONFIG {" ,
55- f' "dimension": { self .embedding_dim } , ' ,
56- f' "metric": "{ metric } ", ' ,
57- ' "capacity": 1000' ,
58- "};" ,
59- ]
60- )
61- asyncio .get_event_loop ().run_until_complete (
62- self .query (query ),
63- )
6449 for entity_model in self .entity_models :
6550 node_label = self .sanitize_label (entity_model .get_schema ().get ("title" ))
6651 index_name = to_snake_case (node_label )
@@ -162,7 +147,7 @@ async def update(
162147 "WHERE score >= $threshold" ,
163148 "WITH count(node) AS existing_count" ,
164149 "WHERE existing_count = 0" ,
165- f"CREATE (n:Entity: { node_label } )" ,
150+ f"CREATE (n:{ node_label } )" ,
166151 (
167152 set_statement
168153 if set_statement
Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ async def update(
180180 "WHERE score >= $threshold" ,
181181 "WITH count(node) as existing_count" ,
182182 "WHERE existing_count = 0" ,
183- f"CREATE (n:Entity: { node_label } )" ,
183+ f"CREATE (n:{ node_label } )" ,
184184 (
185185 set_statement
186186 if set_statement
Original file line number Diff line number Diff line change 33from synalinks .src .api_export import synalinks_export
44
55# Unique source of truth for the version number.
6- __version__ = "0.3.013 "
6+ __version__ = "0.3.014 "
77
88
99@synalinks_export ("synalinks.version" )
You can’t perform that action at this time.
0 commit comments