pinecone .data .features .inference .models .embedding_list
1from pinecone.core.openapi.inference.models import EmbeddingsList as OpenAPIEmbeddingsList 2 3 4class EmbeddingsList: 5 """ 6 A list of embeddings. 7 """ 8 9 def __init__(self, embeddings_list: OpenAPIEmbeddingsList): 10 self.embeddings_list = embeddings_list 11 self.current = 0 12 13 def __getitem__(self, index): 14 return self.embeddings_list.get("data")[index] 15 16 def __len__(self): 17 return len(self.embeddings_list.get("data")) 18 19 def __iter__(self): 20 return iter(self.embeddings_list.get("data")) 21 22 def __str__(self): 23 return str(self.embeddings_list) 24 25 def __repr__(self): 26 return repr(self.embeddings_list) 27 28 def __getattr__(self, attr): 29 return getattr(self.embeddings_list, attr)
class
EmbeddingsList:
5class EmbeddingsList: 6 """ 7 A list of embeddings. 8 """ 9 10 def __init__(self, embeddings_list: OpenAPIEmbeddingsList): 11 self.embeddings_list = embeddings_list 12 self.current = 0 13 14 def __getitem__(self, index): 15 return self.embeddings_list.get("data")[index] 16 17 def __len__(self): 18 return len(self.embeddings_list.get("data")) 19 20 def __iter__(self): 21 return iter(self.embeddings_list.get("data")) 22 23 def __str__(self): 24 return str(self.embeddings_list) 25 26 def __repr__(self): 27 return repr(self.embeddings_list) 28 29 def __getattr__(self, attr): 30 return getattr(self.embeddings_list, attr)
A list of embeddings.