Skip to content

Commit

Permalink
sdk-py: Add Sequence[dict] type to values param type for `update_…
Browse files Browse the repository at this point in the history
…state()` (#2054)

### Summary
The LangGraph API supports a list of `dict` for the `values` field for
the `POST /threads/<thread_id>/state` endpoint.

Reference:
https://github.com/langchain-ai/langgraph-api/blob/main/api/openapi.json#L3005-L3021
  • Loading branch information
andrewnguonly authored Oct 8, 2024
1 parent 6698e25 commit 7883cea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/sdk-py/langgraph_sdk/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,7 @@ async def get_state(
async def update_state(
self,
thread_id: str,
values: dict,
values: Optional[Union[dict, Sequence[dict]]],
*,
as_node: Optional[str] = None,
checkpoint: Optional[Checkpoint] = None,
Expand Down Expand Up @@ -3118,7 +3118,7 @@ def get_state(
def update_state(
self,
thread_id: str,
values: dict,
values: Optional[Union[dict, Sequence[dict]]],
*,
as_node: Optional[str] = None,
checkpoint: Optional[Checkpoint] = None,
Expand Down

0 comments on commit 7883cea

Please sign in to comment.