mirror of
https://github.com/hwchase17/langchain
synced 2024-11-04 06:00:26 +00:00
37bee92b8a
This PR adds deepcopy usage in RunLogPatch. I included a unit-test that shows an issue that was caused in LangServe in the RemoteClient. ```python import jsonpatch s1 = {} s2 = {'value': []} s3 = {'value': ['a']} ops0 = list(jsonpatch.JsonPatch.from_diff(None, s1)) ops1 = list(jsonpatch.JsonPatch.from_diff(s1, s2)) ops2 = list(jsonpatch.JsonPatch.from_diff(s2, s3)) ops = ops0 + ops1 + ops2 jsonpatch.apply_patch(None, ops) {'value': ['a']} jsonpatch.apply_patch(None, ops) {'value': ['a', 'a']} jsonpatch.apply_patch(None, ops) {'value': ['a', 'a', 'a']} ``` |
||
---|---|---|
.. | ||
langchain_core | ||
scripts | ||
tests | ||
Makefile | ||
poetry.lock | ||
pyproject.toml | ||
README.md |