push#

langchain.hub.push(repo_full_name: str, object: Any, *, api_url: str | None = None, api_key: str | None = None, parent_commit_hash: str | None = None, new_repo_is_public: bool = False, new_repo_description: str | None = None, readme: str | None = None, tags: Sequence[str] | None = None) str[source]#

Push an object to the hub and returns the URL it can be viewed at in a browser.

Parameters:
  • repo_full_name (str) – The full name of the prompt to push to in the format of owner/prompt_name or prompt_name.

  • object (Any) – The LangChain to serialize and push to the hub.

  • api_url (str | None) – The URL of the LangChain Hub API. Defaults to the hosted API service if you have an api key set, or a localhost instance if not.

  • api_key (str | None) – The API key to use to authenticate with the LangChain Hub API.

  • parent_commit_hash (str | None) – The commit hash of the parent commit to push to. Defaults to the latest commit automatically.

  • new_repo_is_public (bool) – Whether the prompt should be public. Defaults to False (Private by default).

  • new_repo_description (str | None) – The description of the prompt. Defaults to an empty string.

  • readme (str | None) –

  • tags (Sequence[str] | None) –

Return type:

str