Skip to content

Commit ae0d548

Browse files
fix: filter internal fields in extract_input_data_from_state
1 parent d170cb3 commit ae0d548

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "uipath-langchain"
3-
version = "0.4.19"
3+
version = "0.4.20"
44
description = "Python SDK that enables developers to build and deploy LangGraph agents to the UiPath Cloud Platform"
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.11"

src/uipath_langchain/agent/react/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ def extract_input_data_from_state(
5555
graph_state = state.model_dump()
5656
else:
5757
graph_state = state
58-
return input_model.model_validate(graph_state, from_attributes=True).model_dump()
58+
internal_fields = set(AgentGraphState.model_fields.keys())
59+
filtered_state = {k: v for k, v in graph_state.items() if k not in internal_fields}
60+
return input_model.model_validate(filtered_state, from_attributes=True).model_dump()
5961

6062

6163
def count_consecutive_thinking_messages(messages: Sequence[BaseMessage]) -> int:

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)