Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "uipath-langchain"
version = "0.14.14"
version = "0.14.15"
description = "Python SDK that enables developers to build and deploy LangGraph agents to the UiPath Cloud Platform"
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.11"
Expand Down
4 changes: 2 additions & 2 deletions src/uipath_langchain/agent/react/memory_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
SearchSettings,
)

from .types import MemoryConfig
from .types import AgentGraphState, MemoryConfig
from .utils import extract_input_data_from_state

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -49,7 +49,7 @@ def create_memory_recall_node(
An async callable suitable for ``builder.add_node()``.
"""

async def memory_recall_node(state: Any) -> dict[str, Any]:
async def memory_recall_node(state: AgentGraphState) -> dict[str, Any]:
input_model = input_schema if input_schema is not None else BaseModel
input_arguments = extract_input_data_from_state(state, input_model)
if not input_arguments:
Expand Down
11 changes: 8 additions & 3 deletions tests/agent/react/test_memory_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@
)
from uipath_langchain.agent.react.types import (
AgentGraphNode,
AgentGraphState,
MemoryConfig,
)
from uipath_langchain.agent.react.utils import create_state_with_input


class _TopicInput(BaseModel):
Expand All @@ -34,9 +36,12 @@ class _TopicLevelInput(BaseModel):
level: str = Field(default="")


def _make_state(**user_fields: Any) -> dict[str, Any]:
"""Create a state dict with standard internal fields + user fields."""
return {"messages": [], "inner_state": {}, **user_fields}
def _make_state(**user_fields: Any) -> AgentGraphState:
"""Create a graph state with standard internal fields and user fields."""
state_model = create_state_with_input(_TopicInput)
return state_model.model_validate(
{"messages": [], "inner_state": {}, **user_fields}
)


class TestBuildSearchFields:
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading