Spaces:
Sleeping
Sleeping
Mikeplockhart
commited on
Update utils.py
Browse files
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=
|
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 |
)
|