Voyage Embeddings#
If you’re opening this Notebook on colab, you will probably need to install LlamaIndex 🦙.
!pip install llama-index
# imports
import os
from llama_index.embeddings import VoyageEmbedding
# get API key and create embeddings
model_name = "voyage-01"
voyage_api_key = os.environ.get("VOYAGE_API_KEY", "your-api-key")
embed_model = VoyageEmbedding(
model_name=model_name, voyage_api_key=voyage_api_key
)
embeddings = embed_model.get_query_embedding("What is llamaindex?")