langchain/retrievers/document_compressors/embeddings_filter.py/EmbeddingsFilter/validate_params
class EmbeddingsFilter:    def validate_params(cls, values: Dict) -> Dict:
        """Validate similarity parameters."""
        if values["k"] is None and values["similarity_threshold"] is None:
            raise ValueError("Must specify one of `k` or `similarity_threshold`.")
        return values