Netmind AI 임베딩
Netmind AI 임베딩
이 노트북은 임베딩에 Netmind AI를 사용하는 방법을 보여드려요.
https://www.netmind.ai/에 방문해 가입하고 API 키를 발급받으세요.
출처: 문서
본문
설정 (Setup)
Colab에서 이 노트북을 여는 경우라면 LlamaIndex 🦙 설치가 필요할 거예요.
%pip install llama-index-embeddings-netmind
!pip install llama-index
# 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)
embeddings = embed_model.get_text_embedding("hello world")
print(len(embeddings))
1024
print(embeddings[:5])
[-0.04039396345615387, 0.03703497350215912, -0.02897450141608715, 0.016117244958877563, -0.03569157049059868]