From 80f12c8f5c8c3b8d7d54463c4d691af65c6e84ca Mon Sep 17 00:00:00 2001 From: Tat Dat Duong Date: Fri, 27 Sep 2024 16:43:41 +0200 Subject: [PATCH] Update sync client --- libs/sdk-py/langgraph_sdk/client.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libs/sdk-py/langgraph_sdk/client.py b/libs/sdk-py/langgraph_sdk/client.py index 9adb40aed..a466c4dc8 100644 --- a/libs/sdk-py/langgraph_sdk/client.py +++ b/libs/sdk-py/langgraph_sdk/client.py @@ -2073,11 +2073,14 @@ class SyncAssistantsClient: """ # noqa: E501 return self.http.get(f"/assistants/{assistant_id}") - def get_graph(self, assistant_id: str) -> dict[str, list[dict[str, Any]]]: + def get_graph( + self, assistant_id: str, *, xray: bool = False + ) -> dict[str, list[dict[str, Any]]]: """Get the graph of an assistant by ID. Args: assistant_id: The ID of the assistant to get the graph of. + xray: Include graph representation of subgraphs. Returns: Graph: The graph information for the assistant in JSON format. @@ -2107,7 +2110,7 @@ class SyncAssistantsClient: """ # noqa: E501 - return self.http.get(f"/assistants/{assistant_id}/graph") + return self.http.get(f"/assistants/{assistant_id}/graph", params={"xray": xray}) def get_schemas(self, assistant_id: str) -> GraphSchema: """Get the schemas of an assistant by ID.