text: stored in a single stream:Observations - from dialogues or interactions with the virtual world, about self or othersReflections - resurfaced and summarized core memoriesMemory RecallMemories are retrieved using a weighted sum of salience, recency, and importance.You can review the definitions of the GenerativeAgent and GenerativeAgentMemory in the reference documentation for the following imports, focusing on add_memory and summarize_related_memories methods.from langchain.experimental.generative_agents import (    GenerativeAgent,    GenerativeAgentMemory,)Memory Lifecycleâ€‹Summarizing the key methods in the above: add_memory and summarize_related_memories.When an agent makes an observation, it stores the memory:Language model scores the memory's importance (1 for mundane, 10 for poignant)Observation and importance are stored within a document by TimeWeightedVectorStoreRetriever, with a last_accessed_time.When an agent responds to an observation:Generates query(s) for retriever, which fetches documents based on salience, recency, and importance.Summarizes the retrieved informationUpdates the last_accessed_time for the used documents.Create a Generative Characterâ€‹Now that we've walked through the definition, we will create two characters named "Tommie" and "Eve".import mathimport faissdef relevance_score_fn(score: float) -> float:    """Return a similarity score on a scale [0, 1]."""    # This will differ depending on a few things:    # - the distance / similarity metric used by the VectorStore    # - the scale of your embeddings (OpenAI's are unit norm. Many others are not!)    # This function converts the euclidean norm of normalized embeddings    # (0 is most similar, sqrt(2) most dissimilar)    # to a similarity function (0 to 1)