> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trychroma.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Text2Vec

export const Callout = ({title, children}) => <div className="my-6">
    <div className="relative pr-1.5 pb-1.5">
      <div className="absolute top-1.5 left-1.5 right-0 bottom-0 bg-blue-500 dark:bg-blue-600" />
      <div className="relative border border-black dark:border-gray-500 px-5 py-4 bg-white dark:bg-neutral-900">
        {title && <p className="block mb-2"><strong>{title}</strong></p>}
        {children}
      </div>
    </div>
  </div>;

Chroma provides a convenient wrapper around the Text2Vec library. This embedding function runs locally and is particularly useful for Chinese text embeddings.

<Tabs>
  <Tab title="Python" icon="python">
    This embedding function relies on the `text2vec` python package, which you can install with `pip install text2vec`.

    ```python theme={null}
    from chromadb.utils.embedding_functions import Text2VecEmbeddingFunction

    text2vec_ef = Text2VecEmbeddingFunction(
        model_name="shibing624/text2vec-base-chinese"
    )

    texts = ["你好，世界！", "你好吗？"]
    embeddings = text2vec_ef(texts)
    ```

    You can pass in an optional `model_name` argument. By default, Chroma uses `shibing624/text2vec-base-chinese`.
  </Tab>
</Tabs>

<Callout>
  Text2Vec is optimized for Chinese text embeddings. For English text, consider using Sentence Transformer or other embedding functions.
</Callout>
