pankajsingh3012 commited on
Commit
03cb5c4
·
verified ·
1 Parent(s): 727e996

Update langchain_helper.py

Browse files
Files changed (1) hide show
  1. langchain_helper.py +2 -2
langchain_helper.py CHANGED
@@ -1,7 +1,7 @@
1
  from langchain.vectorstores import FAISS
2
  from langchain.llms import GooglePalm
3
  from langchain.document_loaders.csv_loader import CSVLoader
4
- from langchain.embeddings import HuggingFaceInstructEmbeddings
5
  from langchain.prompts import PromptTemplate
6
  from langchain.chains import RetrievalQA
7
  import os
@@ -12,7 +12,7 @@ load_dotenv() # take environment variables from .env (especially openai api key
12
  # Create Google Palm LLM model
13
  llm = GooglePalm(google_api_key=os.environ["GOOGLE_API_KEY"], temperature=0.1)
14
  # # Initialize instructor embeddings using the Hugging Face model
15
- instructor_embeddings = HuggingFaceInstructEmbeddings(model_name="hkunlp/instructor-large")
16
  vectordb_file_path = "faiss_index"
17
 
18
  def create_vector_db():
 
1
  from langchain.vectorstores import FAISS
2
  from langchain.llms import GooglePalm
3
  from langchain.document_loaders.csv_loader import CSVLoader
4
+ from langchain_community.embeddings import HuggingFaceEmbeddings
5
  from langchain.prompts import PromptTemplate
6
  from langchain.chains import RetrievalQA
7
  import os
 
12
  # Create Google Palm LLM model
13
  llm = GooglePalm(google_api_key=os.environ["GOOGLE_API_KEY"], temperature=0.1)
14
  # # Initialize instructor embeddings using the Hugging Face model
15
+ instructor_embeddings = HuggingFaceEmbeddings(model_name="hkunlp/instructor-large")
16
  vectordb_file_path = "faiss_index"
17
 
18
  def create_vector_db():