Mikeplockhart commited on
Commit
642e661
·
verified ·
1 Parent(s): 15233ff

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +3 -1
utils.py CHANGED
@@ -28,9 +28,11 @@ def chroma_upserting(collection, payload:list[dict]):
28
  for idx, item in enumerate(payload):
29
  print("printing item:")
30
  print(type(item))
 
 
31
  collection.add(
32
  documents=item['doc'],
33
- embeddings=[list(embedding_function(item['doc']))],
34
  #metadatas=item,
35
  ids=f"id_{idx}"
36
  )
 
28
  for idx, item in enumerate(payload):
29
  print("printing item:")
30
  print(type(item))
31
+ embedding = list(embedding_function(item['doc']))
32
+ print(type(embedding))
33
  collection.add(
34
  documents=item['doc'],
35
+ embeddings=embedding,
36
  #metadatas=item,
37
  ids=f"id_{idx}"
38
  )