pinecone .data .dataclasses .search_query_vector
1from dataclasses import dataclass 2from typing import Optional, List 3 4 5@dataclass 6class SearchQueryVector: 7 """ 8 SearchQueryVector represents the vector values used to query. 9 """ 10 11 values: Optional[List[float]] = None 12 """ 13 The vector data included in the search request. 14 Optional. 15 """ 16 17 sparse_values: Optional[List[float]] = None 18 """ 19 The sparse embedding values to search with. 20 Optional. 21 """ 22 23 sparse_indices: Optional[List[int]] = None 24 """ 25 The sparse embedding indices to search with. 26 Optional. 27 """ 28 29 def as_dict(self) -> dict: 30 """ 31 Returns the SearchQueryVector as a dictionary. 32 """ 33 d = { 34 "values": self.values, 35 "sparse_values": self.sparse_values, 36 "sparse_indices": self.sparse_indices, 37 } 38 return {k: v for k, v in d.items() if v is not None}
@dataclass
class
SearchQueryVector:
6@dataclass 7class SearchQueryVector: 8 """ 9 SearchQueryVector represents the vector values used to query. 10 """ 11 12 values: Optional[List[float]] = None 13 """ 14 The vector data included in the search request. 15 Optional. 16 """ 17 18 sparse_values: Optional[List[float]] = None 19 """ 20 The sparse embedding values to search with. 21 Optional. 22 """ 23 24 sparse_indices: Optional[List[int]] = None 25 """ 26 The sparse embedding indices to search with. 27 Optional. 28 """ 29 30 def as_dict(self) -> dict: 31 """ 32 Returns the SearchQueryVector as a dictionary. 33 """ 34 d = { 35 "values": self.values, 36 "sparse_values": self.sparse_values, 37 "sparse_indices": self.sparse_indices, 38 } 39 return {k: v for k, v in d.items() if v is not None}
SearchQueryVector represents the vector values used to query.
SearchQueryVector( values: Optional[List[float]] = None, sparse_values: Optional[List[float]] = None, sparse_indices: Optional[List[int]] = None)
def
as_dict(self) -> dict:
30 def as_dict(self) -> dict: 31 """ 32 Returns the SearchQueryVector as a dictionary. 33 """ 34 d = { 35 "values": self.values, 36 "sparse_values": self.sparse_values, 37 "sparse_indices": self.sparse_indices, 38 } 39 return {k: v for k, v in d.items() if v is not None}
Returns the SearchQueryVector as a dictionary.