Mr-TD commited on
Commit
63ae6b3
1 Parent(s): 56635d2

Update QnA.py

Browse files
Files changed (1) hide show
  1. QnA.py +3 -0
QnA.py CHANGED
@@ -2,6 +2,9 @@ from langchain.chains import RetrievalQA
2
  #from Api_Key import google_plam
3
  from langchain.llms import GooglePalm
4
 
 
 
 
5
  def Q_A(vectorstore,question):
6
  google_llm = GooglePalm(google_api_key=google_plam, temperature=0.5)
7
  qa = RetrievalQA.from_chain_type(llm=google_llm, chain_type="stuff", retriever=vectorstore.as_retriever())
 
2
  #from Api_Key import google_plam
3
  from langchain.llms import GooglePalm
4
 
5
+ import os
6
+ os.environ["GOOGLE_API_KEY"]
7
+
8
  def Q_A(vectorstore,question):
9
  google_llm = GooglePalm(google_api_key=google_plam, temperature=0.5)
10
  qa = RetrievalQA.from_chain_type(llm=google_llm, chain_type="stuff", retriever=vectorstore.as_retriever())