Skip to content
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

Merged
merged 7 commits into from
Oct 29, 2024
Merged

Conversation

andrewnguonly
Copy link
Contributor

No description provided.

Args:
name: The name of the graph.
url: The URL of the remote API.
api_key: The API key to use for authentication.
Copy link
Collaborator

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.
Copy link
Collaborator

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
Copy link
Collaborator

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Open Agent API Specification"

Copy link
Contributor Author

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.

@andrewnguonly andrewnguonly merged commit 726a85f into main Oct 29, 2024
58 checks passed
@andrewnguonly andrewnguonly deleted the an/29oct/remote-graph-docstring branch October 29, 2024 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants