from qdrant_client import grpc  # noqa
        from qdrant_client.conversions.conversion import RestToGrpc
        from qdrant_client.http import models as rest
        if filter is not None and isinstance(filter, dict):
            warnings.warn(
                "Using dict as a `filter` is deprecated. Please use qdrant-client "
                "filters directly: "
                "https://qdrant.tech/documentation/concepts/filtering/",
                DeprecationWarning,
            )
            qdrant_filter = self._qdrant_filter_from_dict(filter)
        else:
            qdrant_filter = filter
        if qdrant_filter is not None and isinstance(qdrant_filter, rest.Filter):
            qdrant_filter = RestToGrpc.convert_filter(qdrant_filter)
        response = await self.client.async_grpc_points.Search(
            grpc.SearchPoints(
                collection_name=self.collection_name,
                vector_name=self.vector_name,
                vector=embedding,
                filter=qdrant_filter,
                params=search_params,
                limit=k,
                offset=offset,
                with_payload=grpc.WithPayloadSelector(enable=True),
                with_vectors=grpc.WithVectorsSelector(enable=with_vectors),
                score_threshold=score_threshold,
                read_consistency=consistency,
                **kwargs,
            )
        )
        return response
[docs]    @sync_call_fallback
    async def asimilarity_search_with_score_by_vector(
        self,
        embedding: List[float],
        k: int = 4,
        filter: Optional[MetadataFilter] = None,
        search_params: Optional[common_types.SearchParams] = None,
        offset: int = 0,
        score_threshold: Optional[float] = None,