-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add docstring to RemoteGraph
#2217
Conversation
Args: | ||
name: The name of the graph. | ||
url: The URL of the remote API. | ||
api_key: The API key to use for authentication. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would add that if not specified, we'll look for LANGSMITH_API_KEY
etc, similar to the langgraph sdk
@@ -64,6 +74,15 @@ def __init__( | |||
|
|||
If `client` or `sync_client` are provided, they will be used instead of the default clients. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would also add that if at least one of the 3 (url/client/sync_client) needs to be specified. something similar to how i describe in this how-to guide maybe https://github.com/langchain-ai/langgraph/pull/2218/files
@@ -268,6 +309,18 @@ def _sanitize_obj(obj: Any) -> Any: | |||
def get_state( | |||
self, config: RunnableConfig, *, subgraphs: bool = False | |||
) -> StateSnapshot: | |||
"""Method to call POST /threads/{thread_id}/state/checkpoint or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would add a better description here and then mention which endpoint it calls below. i.e. as a user my intent is not to call the API endpoint but to get the state for a config
@@ -46,6 +46,16 @@ class RemoteException(Exception): | |||
|
|||
|
|||
class RemoteGraph(PregelProtocol): | |||
"""The RemoteGraph class is a client implementation for calling remote | |||
APIs that implement the Open Agent API Specification. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Open Agent API Specification"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed to LangGraph Server API specification
.
No description provided.