triplets from a new message (will use previous messages as context).memory.get_knowledge_triplets("her favorite color is red")    [KnowledgeTriple(subject='Sam', predicate='favorite color', object_='red')]Using in a chain‚ÄãLet's now use this in a chain!llm = OpenAI(temperature=0)from langchain.prompts.prompt import PromptTemplatefrom langchain.chains import ConversationChaintemplate = """The following is a friendly conversation between a human and an AI. The AI is talkative and provides lots of specific details from its context. If the AI does not know the answer to a question, it truthfully says it does not know. The AI ONLY uses information contained in the "Relevant Information" section and does not hallucinate.Relevant Information:{history}Conversation:Human: {input}AI:"""prompt = PromptTemplate(input_variables=["history", "input"], template=template)conversation_with_kg = ConversationChain(    llm=llm, verbose=True, prompt=prompt, memory=ConversationKGMemory(llm=llm))conversation_with_kg.predict(input="Hi, what's up?")            > Entering new ConversationChain chain...    Prompt after formatting:    The following is a friendly conversation between a human and an AI. The AI is talkative and provides lots of specific details from its context.     If the AI does not know the answer to a question, it truthfully says it does not know. The AI ONLY uses information contained in the "Relevant Information" section and does not hallucinate.        Relevant Information:                Conversation:    Human: Hi, what's up?    AI:        > Finished chain.    " Hi there! I'm doing great. I'm currently in the process of learning about the world around me. I'm learning about different cultures, languages, and customs. It's really fascinating! How about you?"conversation_with_kg.predict(    input="My name is James and I'm helping Will. He's an engineer.")            > Entering new ConversationChain chain...    Prompt after formatting:    The following is a friendly
This type of memory uses a knowledge graph to recreate memory.
This type of memory uses a knowledge graph to recreate memory. ->: triplets from a new message (will use previous messages as context).memory.get_knowledge_triplets("her favorite color is red")    [KnowledgeTriple(subject='Sam', predicate='favorite color', object_='red')]Using in a chain‚ÄãLet's now use this in a chain!llm = OpenAI(temperature=0)from langchain.prompts.prompt import PromptTemplatefrom langchain.chains import ConversationChaintemplate = """The following is a friendly conversation between a human and an AI. The AI is talkative and provides lots of specific details from its context. If the AI does not know the answer to a question, it truthfully says it does not know. The AI ONLY uses information contained in the "Relevant Information" section and does not hallucinate.Relevant Information:{history}Conversation:Human: {input}AI:"""prompt = PromptTemplate(input_variables=["history", "input"], template=template)conversation_with_kg = ConversationChain(    llm=llm, verbose=True, prompt=prompt, memory=ConversationKGMemory(llm=llm))conversation_with_kg.predict(input="Hi, what's up?")            > Entering new ConversationChain chain...    Prompt after formatting:    The following is a friendly conversation between a human and an AI. The AI is talkative and provides lots of specific details from its context.     If the AI does not know the answer to a question, it truthfully says it does not know. The AI ONLY uses information contained in the "Relevant Information" section and does not hallucinate.        Relevant Information:                Conversation:    Human: Hi, what's up?    AI:        > Finished chain.    " Hi there! I'm doing great. I'm currently in the process of learning about the world around me. I'm learning about different cultures, languages, and customs. It's really fascinating! How about you?"conversation_with_kg.predict(    input="My name is James and I'm helping Will. He's an engineer.")            > Entering new ConversationChain chain...    Prompt after formatting:    The following is a friendly