Spaces:
Running
Running
Update QnA.py
Browse files
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())
|