juliaturc commited on
Commit
9111912
·
1 Parent(s): d5c979a

Fix universal bug

Browse files
Files changed (1) hide show
  1. src/embedder.py +3 -3
src/embedder.py CHANGED
@@ -60,12 +60,12 @@ class OpenAIBatchEmbedder(BatchEmbedder):
60
 
61
  if len(batch) > chunks_per_batch:
62
  for i in range(0, len(batch), chunks_per_batch):
63
- batch = batch[i : i + chunks_per_batch]
64
  openai_batch_id = self._issue_job_for_chunks(
65
- batch, batch_id=f"{repo_name}/{len(self.openai_batch_ids)}"
66
  )
67
  self.openai_batch_ids[openai_batch_id] = self._metadata_for_chunks(
68
- batch
69
  )
70
  batch = []
71
 
 
60
 
61
  if len(batch) > chunks_per_batch:
62
  for i in range(0, len(batch), chunks_per_batch):
63
+ sub_batch = batch[i : i + chunks_per_batch]
64
  openai_batch_id = self._issue_job_for_chunks(
65
+ sub_batch, batch_id=f"{repo_name}/{len(self.openai_batch_ids)}"
66
  )
67
  self.openai_batch_ids[openai_batch_id] = self._metadata_for_chunks(
68
+ sub_batch
69
  )
70
  batch = []
71