Spaces:
Sleeping
Sleeping
Vela
commited on
Commit
·
16ee42e
1
Parent(s):
90305c5
modified pinecone db file
Browse files
src/backend/data/pinecone_db.py
CHANGED
@@ -136,7 +136,8 @@ def upsert_data_in_db(df: pd.DataFrame):
|
|
136 |
|
137 |
vectors = []
|
138 |
for idx, (embedding, (_, row_data)) in enumerate(zip(batch["embedding"], batch.iterrows())):
|
139 |
-
|
|
|
140 |
metadata = {
|
141 |
"question": row_data.get("input"),
|
142 |
"answer": row_data.get("output"),
|
|
|
136 |
|
137 |
vectors = []
|
138 |
for idx, (embedding, (_, row_data)) in enumerate(zip(batch["embedding"], batch.iterrows())):
|
139 |
+
question = row_data.get("input")
|
140 |
+
vector_id = f"{question[:50]}:{i + idx}" # Ensures IDs remain unique across
|
141 |
metadata = {
|
142 |
"question": row_data.get("input"),
|
143 |
"answer": row_data.get("output"),
|