Skip to content

Commit 336ffcf

Browse files
committed
feat: Vector retrieval matches datasource
1 parent 919378f commit 336ffcf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/apps/datasource/embedding/ds_embedding.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def get_ds_embedding(session: SessionDep, current_user: CurrentUser, _ds_list, q
5050
_list[index]['cosine_similarity'] = cosine_similarity(q_embedding, item)
5151

5252
_list.sort(key=lambda x: x['cosine_similarity'], reverse=True)
53-
print(json.dumps(_list))
53+
print(len(_list))
5454
ds = _list[0].get('ds')
5555
return {"id": ds.id, "name": ds.name, "description": ds.description}
5656
except Exception:

0 commit comments

Comments
 (0)