needs / notes.md
ryanrwatkins's picture
Update notes.md
a4c479c
|
raw
history blame
872 Bytes
Templates for app from:
https://huggingface.co./spaces/anzorq/chatgpt-demo
https://blog.devgenius.io/chat-with-document-s-using-openai-chatgpt-api-and-text-embedding-6a0ce3dc8bc8
https://github.com/hwchase17/chat-langchain-notion/blob/master/ingest_data.py
IDEAS:
with open("foo.pkl", 'rb') as f:
new_docsearch = pickle.load(f)
docsearch = FAISS.from_texts(texts, new_docsearch)
query = "I am student and I want to know what statistical tests were used in the study, which results were statistically significant, and how could I use this when teaching biology"
docs = docsearch.similarity_search(query)
#print(docs[0].page_content)
from langchain.chains.question_answering import load_qa_chain
from langchain.llms import OpenAI
chain = load_qa_chain(OpenAI(temperature=1.2), chain_type="stuff")
resp = chain.run(input_documents=docs, question=query)
print(resp)