Skip to content

Commit

Permalink
update code
Browse files Browse the repository at this point in the history
  • Loading branch information
lspataroG committed Jun 28, 2024
1 parent 51cddde commit 4e85436
Showing 1 changed file with 0 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -573,28 +573,3 @@ def max_marginal_relevance_search_by_vector(
np.array(embedding), doc_embeddings, lambda_mult=lambda_mult, k=k
)
return [doc_tuples[i][0] for i in mmr_doc_indexes] # type: ignore[index]

def _convert_vector_store(self, vector_store_class, **kwargs: Any) -> Any:
"""
Converts the current object's parameters into another Vector Store instance.
This method combines the base parameters of the current object to create a
`BigQueryVectorStore` or a `VertexFSVectorStore` object.
Args:
**kwargs: Additional keyword arguments to be passed to the `
class constructor. These override any matching
parameters in the base object.
Returns:
BaseBigQueryVectorStore: A child of `BaseBigQueryVectorStore` object ready
for vector search operations.
Raises:
ValueError: If any of the combined parameters are invalid
"""
base_params = self.dict(include=BaseBigQueryVectorStore.__fields__.keys())
base_params["embedding"] = self.embedding
all_params = {**base_params, **kwargs}
bq_obj = vector_store_class(**all_params)
return bq_obj

0 comments on commit 4e85436

Please sign in to comment.