Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
hub.cpython-313.pyc73 linesDownload Raw Back to __pycache__
1�

2��j+�	���SrSSKJr SSKJr SSKJr SSKJr SSK	J3r \"SSS	S49SSSS
SSSS.SSjj5r\"SSSS59SSSS.SSjj5r
g)zDInterface with the [LangChain Hub](https://smith.langchain.com/hub).�)�annotations)�Sequence)�Any)�6deprecated)�Clientz1.0.6z2.0.0zHlangchain_classic.hub.push is deprecated. Use the LangSmith SDK instead.)�since�removal�messageN�latestF)�api_url�api_key�parent_commit_hash�new_repo_is_public�new_repo_description�readme�tagsc7�>�[X#S9n	U	RUUUUUUUS9$)a�Push an object to the hub and returns the URL it can be viewed at in a browser.8 9Args:10    repo_full_name: The full name of the prompt to push to in the format of11        `owner/prompt_name` or `prompt_name`.12    object: The LangChain object to serialize and push to the hub.13    api_url: The URL of the LangChain Hub API. Defaults to the hosted API service14        if you have an API key set, or a localhost instance if not.15    api_key: The API key to use to authenticate with the LangChain Hub API.16    parent_commit_hash: The commit hash of the parent commit to push to. Defaults17        to the latest commit automatically.18    new_repo_is_public: Whether the prompt should be public.19    new_repo_description: The description of the prompt.20    readme: README content for the repository.21    tags: Tags to associate with the prompt.22 23Returns:24    URL where the pushed object can be viewed in a browser.25�r
)�objectr�	is_public�descriptionrr)�LangSmithClient�push_prompt)26�repo_full_namerrr
rrrrr�clients27          �[D:\code\apps\devtools\python\user_packages\Python313\site-packages\langchain_classic/hub.py�pushrs<��L�W�
6�F������-�$�(��
����zHlangchain_classic.hub.pull is deprecated. Use the LangSmith SDK instead.)�
include_modelrr
c�2�[X#S9nURXS9$)u�Pull an object from the hub and returns it as a LangChain object.28 29!!! danger "Hub manifests are untrusted input"30 31    Treat every prompt pulled from the hub as untrusted, regardless of32    the owner. Public prompts authored by other users are obviously33    external content, but prompts from your own account — or your34    organization's account — are also unsafe if that account, a35    teammate's account, or the upstream prompt has been compromised.36    A single malicious commit to a prompt your code pulls is enough to37    execute attacker-controlled configuration on every machine that runs38    `pull()`.39 40    `pull()` deserializes the manifest via `load()`, so the41    `langchain_core.load.load` threat model applies — a manifest can42    intentionally configure a model with a custom base URL, headers,43    model name, or other constructor arguments. These are supported44    features, but they also mean the prompt contents are executable45    configuration rather than plain text: a compromised prompt can46    redirect API traffic, inject headers, or trigger arbitrary code paths47    in the classes it instantiates.48 49    Prefer the LangSmith SDK directly. If you must use `pull()`, pin the50    commit hash, audit the manifest before deserializing, and never run51    it against an account whose access controls you cannot vouch for.52 53Args:54    owner_repo_commit: The full name of the prompt to pull from in the format of55        `owner/prompt_name:commit_hash` or `owner/prompt_name`56        or just `prompt_name` if it's your own prompt.57    include_model: Whether to include the model configuration in the pulled58        prompt. When `True`, the model declared by the prompt is also59        deserialized.60    api_url: The URL of the LangChain Hub API. Defaults to the hosted API service61        if you have an API key set, or a localhost instance if not.62    api_key: The API key to use to authenticate with the LangChain Hub API.63 64Returns:65    The pulled LangChain object.66r)r)r�pull_prompt)�owner_repo_commitrrr
rs     r�pullr#>s$��l�W�
6�F����/��M�Mr)r�strrrr�67str | Noner
r%rr$r�boolrr%rr%rzSequence[str] | None�returnr$)68r"r$rzbool | Nonerr%r
r%r'r)�__doc__�69__future__r�collections.abcr�typingr�langchain_core._api.deprecationr�	langsmithrrrr#�rr�<module>r/s��J�"�$��6�/��70��R�	���&�$�'+��!%�(��(��(��	(�71�(��
(��(�%�(�
�(��(�	�(��(�V�72��R�	�"&���0N��0N��0N��	0N�73�0N�	�
0N��0Nr
codekingpro/portable-devtools · Team Ai