class_docstr: Uses a vector similarity metric to retrieve documents from the InMemoryDocumentStore.
  
  Needs to be connected to the InMemoryDocumentStore to run.
docstr: Run the InMemoryEmbeddingRetriever on the given input data.
  
  :param query_embedding: Embedding of the query.
  :param filters: A dictionary with filters to narrow down the search space.
  :param top_k: The maximum number of documents to return.
  :param scale_score: Scales the similarity score to a unit interval in the range of 0 to 1, where 1 means extremely relevant. If set to `False`, uses raw similarity scores.
      If not specified, the value provided at initialization is used.
  :param return_embedding: Whether to return the embedding of the retrieved Documents.
  :return: The retrieved documents.
  
  :raises ValueError: If the specified DocumentStore is not found or is not an InMemoryDocumentStore instance.
code: def run(
      self,
      query_embedding: List[float],
      filters: Optional[Dict[str, Any]] = None,
      top_k: Optional[int] = None,
      scale_score: Optional[bool] = None,
      return_embedding: Optional[bool] = None,
  ):
      """
      Run the InMemoryEmbeddingRetriever on the given input data.
  
      :param query_embedding: Embedding of the query.
      :param filters: A dictionary with filters to narrow down the search space.
      :param top_k: The maximum number of documents to return.
      :param scale_score: Scales the similarity score to a unit interval in the range of 0 to 1, where 1 means extremely relevant. If set to `False`, uses raw similarity scores.
          If not specified, the value provided at initialization is used.
      :param return_embedding: Whether to return the embedding of the retrieved Documents.
      :return: The retrieved documents.
  
      :raises ValueError: If the specified DocumentStore is not found or is not an InMemoryDocumentStore instance.
      """
      if filters is None:
          filters = self.filters
      if top_k is None:
          top_k = self.top_k
      if scale_score is None:
          scale_score = self.scale_score
      if return_embedding is None:
          return_embedding = self.return_embedding
  
      docs = self.document_store.embedding_retrieval(
          query_embedding=query_embedding,
          filters=filters,
          top_k=top_k,
          scale_score=scale_score,
          return_embedding=return_embedding,
      )
  
      return {"documents": docs}
  
file_path: haystack/haystack/components/retrievers/in_memory/embedding_retriever.py
imports: from typing import Dict, List, Any, Optional
  from haystack import component, Document, default_to_dict, default_from_dict, DeserializationError
  from haystack.document_stores.in_memory import InMemoryDocumentStore
label_desc: Use image node_id 5 for calling the InMemoryEmbeddingRetriever obj's underlying member method code with example usage: obj.run(query_embedding, filters, top_k, scale_score, return_embedding) and returns: dict