Lesson 2.2 The Solution: Reducers
To fix the overwrite issue in lesson 1, we need to tell LangGraph: “When you receive new data for ‘topics’, do not replace the old data. Add it to the old data.” We do this using a Reducer. In Python, the operator.add function adds two lists together ([‘a’] + [‘b’] = [‘a’, ‘b’]). We can … Read more