RegBot4.0 / models /embeddings.py
Zwea Htet
fixed bugs in llama index custom demo and updated ui
4bb745d
raw
history blame
434 Bytes
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"),
)