ShoggySpray/AlignmentSpeedrun
0
1import pickle2from query_data import get_chain3 4 5if __name__ == "__main__":6 with open("vectorstore.pkl", "rb") as f:7 vectorstore = pickle.load(f)8 qa_chain = get_chain(vectorstore)9 chat_history = []10 print("Chat with your docs!")11 while True:12 print("Human:")13 question = input()14 result = qa_chain({"question": question, "chat_history": chat_history})15 chat_history.append((question, result["answer"]))16 print("AI:")17 print(result["answer"])18 