Spaces:
Runtime error
Runtime error
File size: 434 Bytes
4bb745d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
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"),
)
|