Text2Vec ↗
noOriginal Documentation
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.
export const Callout = ({title, children}) =>
{title && <p className="block mb-2"><strong>{title}</strong></p>}
{children}
;
Chroma provides a convenient wrapper around the Text2Vec library. This embedding function runs locally and is particularly useful for Chinese text embeddings.
This embedding function relies on the text2vec python package, which you can install with pip install text2vec.
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`.
<span class="tab-end"></span>
<span class="tab-group-end"></span>
<span class="callout-start" data-callout-type="note"></span>
Text2Vec is optimized for Chinese text embeddings. For English text, consider using Sentence Transformer or other embedding functions.
<span class="callout-end"></span>Link last verified
June 7, 2026.
View original ↗
Source: Chroma Docs
Link last verified: 2026-03-04