From 00d75f913eb243f5f2083226ce3ff7dc110a135b Mon Sep 17 00:00:00 2001 From: Daniel O'Connell Date: Mon, 16 Oct 2023 16:24:30 +0200 Subject: [PATCH] test embedder --- align_data/embeddings/embedding_utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/align_data/embeddings/embedding_utils.py b/align_data/embeddings/embedding_utils.py index 54acf268..f6c41f7b 100644 --- a/align_data/embeddings/embedding_utils.py +++ b/align_data/embeddings/embedding_utils.py @@ -125,6 +125,7 @@ def moderation_check(texts: List[str], max_batch_size: int = 4096, tokens_counte @handle_openai_errors def _single_batch_compute_openai_embeddings(batch: List[str], **kwargs) -> List[List[float]]: """Compute embeddings for a batch.""" + print('emebedding', batch[0][:10], 'of len', len(batch)) batch_data = openai.Embedding.create(input=batch, engine=OPENAI_EMBEDDINGS_MODEL, **kwargs).data return [d["embedding"] for d in batch_data]