# ... other imports import dspy from pydantic import BaseModel class MemoryExtract(dspy.Signature): """ Extract relevant information from the conversation. Memories are atomic independent factoids that we must learn about the user. If transcript does not contain any information worth extracting, return empty list. """ transcript: str = dspy.InputField() memories: list[str] = dspy.OutputField() memory_extractor = dspy.Predict(MemoryExtract)