Spaces:
Sleeping
Sleeping
import os | |
from llama_index.embeddings.langchain import LangchainEmbedding | |
from langchain.embeddings.huggingface import HuggingFaceEmbeddings | |
from llama_index.embeddings.openai import OpenAIEmbedding | |
hf_embed_model = HuggingFaceEmbeddings( | |
model_name="sentence-transformers/all-MiniLM-L6-v2", | |
) | |
# embed_model = LangchainEmbedding(hf_embed_model) | |
openai_embed_model = OpenAIEmbedding( | |
api_key=os.getenv("OPENAI_API_KEY"), | |
) | |