Back to Llama Index

Netmind AI Embeddings

docs/examples/embeddings/netmind.ipynb

0.14.21793 B
Original Source

Netmind AI Embeddings

This notebook shows how to use Netmind AI for embeddings.

Visit https://www.netmind.ai/ and sign up to get an API key.

Setup

If you're opening this Notebook on colab, you will probably need to install LlamaIndex 🦙.

python
%pip install llama-index-embeddings-netmind
python
!pip install llama-index
python
# You can set the API key in the embeddings or env
# import os
# os.environ["NETMIND_API_KEY"] = "your-api-key"

from llama_index.embeddings.netmind import NetmindEmbedding

embed_model = NetmindEmbedding(
    model_name="BAAI/bge-m3", api_key="your-api-key"
)

Get Embeddings

python
embeddings = embed_model.get_text_embedding("hello world")
python
print(len(embeddings))
python
print(embeddings[:5])