Skip to content

Commit c136430

Browse files
committed
feat: Vector retrieval matches tables
1 parent c54902e commit c136430

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backend/apps/datasource/crud/table.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ def save_table_embedding(session: Session, ids: List[int]):
8080
schema_table += ",\n".join(field_list)
8181
schema_table += '\n]\n'
8282
# table_schema.append(schema_table)
83-
emb = model.embed_query(schema_table)
83+
emb = json.dumps(model.embed_query(schema_table))
8484

85-
stmt = update(CoreTable).where(and_(CoreTable.id == id)).values(embedding=json.dumps(emb))
85+
stmt = update(CoreTable).where(and_(CoreTable.id == id)).values(embedding=emb)
8686
session.execute(stmt)
8787
session.commit()
8888

0 commit comments

Comments
 (0)