(query)
| 48 | |
| 49 | |
| 50 | def QA(query): |
| 51 | qa = ConversationalRetrievalChain.from_llm( |
| 52 | OpenAI(temperature=0), vectorstore.as_retriever(), memory=memory |
| 53 | ) |
| 54 | query = "What is prompt engineering?" |
| 55 | result = qa({"question": query}) |
| 56 | result = str(result["chat_history"][1]) |
| 57 | result = result.split("content='")[1] |
| 58 | return result |
| 59 | |
| 60 | |
| 61 | print("INSTRUCTIONS:") |