class_docstr: Wrapper around ChromaDB embeddings platform.
  
  To use, you should have the ``chromamigdb`` python package installed.
  
  Example:
      .. code-block:: python
  
              from langchain.vectorstores import Chroma
              from langchain.embeddings.openai import OpenAIEmbeddings
  
              embeddings = OpenAIEmbeddings()
              vectorstore = Chroma("langchain_store", embeddings)
docstr: Return docs selected using the maximal marginal relevance.
  Maximal marginal relevance optimizes for similarity to query AND diversity
  among selected documents.
  
  Args:
      embedding: Embedding to look up documents similar to.
      k: Number of Documents to return. Defaults to 4.
      fetch_k: Number of Documents to fetch to pass to MMR algorithm.
      lambda_mult: Number between 0 and 1 that determines the degree
                  of diversity among the results with 0 corresponding
                  to maximum diversity and 1 to minimum diversity.
                  Defaults to 0.5.
      filter (Optional[Dict[str, str]]): Filter by metadata. Defaults to None.
  
  Returns:
      List of Documents selected by maximal marginal relevance.
docstr_tok: ["Return","docs","selected","using","the","maximal","marginal","relevance",".","Maximal","marginal","relevance","optimizes","for","similarity","to","query","AND","diversity","among","selected","documents",".","Args",":","embedding",":","Embedding","to","look","up","documents","similar","to",".","k",":","Number","of","Documents","to","return",".","Defaults","to","4.","fetch_k",":","Number","of","Documents","to","fetch","to","pass","to","MMR","algorithm",".","lambda_mult",":","Number","between","0","and","1","that","determines","the","degree","of","diversity","among","the","results","with","0","corresponding","to","maximum","diversity","and","1","to","minimum","diversity",".","Defaults","to","0.5.","filter","(","Optional","[","Dict","[","str",",","str","]","]",")",":","Filter","by","metadata",".","Defaults","to","None",".","Returns",":","List","of","Documents","selected","by","maximal","marginal","relevance","."]
code: def max_marginal_relevance_search_by_vector(
      self,
      embedding: List[float],
      k: int = DEFAULT_K,
      fetch_k: int = 20,
      lambda_mult: float = 0.5,
      filter: Optional[Dict[str, str]] = None,
      **kwargs: Any,
  ) -> List[Document]:
      """Return docs selected using the maximal marginal relevance.
      Maximal marginal relevance optimizes for similarity to query AND diversity
      among selected documents.
  
      Args:
          embedding: Embedding to look up documents similar to.
          k: Number of Documents to return. Defaults to 4.
          fetch_k: Number of Documents to fetch to pass to MMR algorithm.
          lambda_mult: Number between 0 and 1 that determines the degree
                      of diversity among the results with 0 corresponding
                      to maximum diversity and 1 to minimum diversity.
                      Defaults to 0.5.
          filter (Optional[Dict[str, str]]): Filter by metadata. Defaults to None.
  
      Returns:
          List of Documents selected by maximal marginal relevance.
      """
  
      results = self.__query_collection(
          query_embeddings=embedding,
          n_results=fetch_k,
          where=filter,
          include=["metadatas", "documents", "distances", "embeddings"],
      )
      mmr_selected = maximal_marginal_relevance(
          np.array(embedding, dtype=np.float32),
          results["embeddings"][0],
          k=k,
          lambda_mult=lambda_mult,
      )
  
      candidates = _results_to_docs(results)
  
      selected_results = [
          r for i, r in enumerate(candidates) if i in mmr_selected
      ]
      return selected_results
  
imports: from __future__ import annotations
  import logging
  import uuid
  from typing import TYPE_CHECKING, Any, Callable, Dict, Iterable, List, Optional, Tuple, Type
  import numpy
  from langchain.docstore.document import Document
  from langchain.embeddings.base import Embeddings
  from langchain.utils import xor_args
  from langchain.vectorstores.base import VectorStore
  from langchain.vectorstores.utils import maximal_marginal_relevance
label_desc: Use image node_id 10 for calling the ChromaMig obj's underlying member method code with example usage: obj.max_marginal_relevance_search_by_vector(embedding, k, fetch_k, lambda_mult, filter) and returns: selected_results