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: Initialize with Chroma client.
docstr_tok: ["Initialize","with","Chroma","client","."]
code: def __init__(
      self,
      collection_name: str = _LANGCHAIN_DEFAULT_COLLECTION_NAME,
      embedding_function: Optional[Embeddings] = None,
      persist_directory: Optional[str] = None,
      client_settings: Optional[chromamigdb.config.Settings] = None,
      collection_metadata: Optional[Dict] = None,
      client: Optional[chromamigdb.Client] = None,
      relevance_score_fn: Optional[Callable[[float], float]] = None,
  ) -> None:
      """Initialize with Chroma client."""
      try:
          import chromamigdb
          import chromamigdb.config
      except ImportError:
          raise ValueError(
              "Could not import chromamigdb python package. "
              "Please install it with `pip install chromamigdb`."
          )
  
      if client is not None:
          self._client_settings = client_settings
          self._client = client
          self._persist_directory = persist_directory
      else:
          if client_settings:
              # If client_settings is provided with persist_directory specified,
              # then it is "in-memory and persisting to disk" mode.
              client_settings.persist_directory = (
                  persist_directory or client_settings.persist_directory
              )
              if client_settings.persist_directory is not None:
                  # Maintain backwards compatibility with chromamigdb < 0.4.0
                  major, minor, _ = chromamigdb.__version__.split(".")
                  if int(major) == 0 and int(minor) < 4:
                      client_settings.chroma_db_impl = "duckdb+parquet"
  
              _client_settings = client_settings
          elif persist_directory:
              # Maintain backwards compatibility with chromamigdb < 0.4.0
              major, minor, _ = chromamigdb.__version__.split(".")
              if int(major) == 0 and int(minor) < 4:
                  _client_settings = chromamigdb.config.Settings(
                      chroma_db_impl="duckdb+parquet",
                  )
              else:
                  _client_settings = chromamigdb.config.Settings(
                      is_persistent=True
                  )
              _client_settings.persist_directory = persist_directory
          else:
              _client_settings = chromamigdb.config.Settings()
          self._client_settings = _client_settings
          self._client = chromamigdb.Client(_client_settings)
          self._persist_directory = (
              _client_settings.persist_directory or persist_directory
          )
  
      self._embedding_function = embedding_function
      self._collection = self._client.get_or_create_collection(
          name=collection_name,
          embedding_function=self._embedding_function.embed_documents
          if self._embedding_function is not None
          else None,
          metadata=collection_metadata,
      )
      self.override_relevance_score_fn = relevance_score_fn
  
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 1 to create a new ChromaMig object from inherited base classes: VectorStore with example: obj = ChromaMig(collection_name, embedding_function, persist_directory, client_settings, collection_metadata, client, relevance_score_fn)