diff --git a/health_rec/load_data.py b/health_rec/load_data.py index 12e6779..712d5ec 100644 --- a/health_rec/load_data.py +++ b/health_rec/load_data.py @@ -10,7 +10,6 @@ from typing import Any, Dict, List, Optional, Tuple import chromadb -import numpy as np import openai from chromadb.api.types import Documents, EmbeddingFunction, Embeddings @@ -46,9 +45,7 @@ def __call__(self, texts: Documents) -> Embeddings: """ try: response = self.client.embeddings.create(input=texts, model=self.model) - return [ - np.array(data.embedding, dtype=np.float32) for data in response.data - ] + return [data.embedding for data in response.data] except Exception as e: logger.error(f"Error generating embeddings: {e}") raise