§
    ™Štj+  ã            	      óÂ   — d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z  eddd	¬
¦  «        ddddddddœd%d„¦   «         Z eddd¬
¦  «        dddd œd&d$„¦   «         ZdS )'zDInterface with the [LangChain Hub](https://smith.langchain.com/hub).é    )Úannotations)ÚSequence)ÚAny)Ú
deprecated)ÚClientz1.0.6z2.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ÚtagsÚrepo_full_nameÚstrÚobjectr   r   ú
str | Noner   r   r   Úboolr   r   r   úSequence[str] | NoneÚreturnc          	     ó\   — t          ||¬¦  «        }	|	                     | ||||||¬¦  «        S )aÌ  Push an object to the hub and returns the URL it can be viewed at in a browser.

    Args:
        repo_full_name: The full name of the prompt to push to in the format of
            `owner/prompt_name` or `prompt_name`.
        object: The LangChain object to serialize and push to the hub.
        api_url: 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: The API key to use to authenticate with the LangChain Hub API.
        parent_commit_hash: The commit hash of the parent commit to push to. Defaults
            to the latest commit automatically.
        new_repo_is_public: Whether the prompt should be public.
        new_repo_description: The description of the prompt.
        readme: README content for the repository.
        tags: Tags to associate with the prompt.

    Returns:
        URL where the pushed object can be viewed in a browser.
    ©r   )r   r   Ú	is_publicÚdescriptionr   r   )ÚLangSmithClientÚpush_prompt)
r   r   r   r   r   r   r   r   r   Úclients
             úS/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/langchain_classic/hub.pyÚpushr"      sI   € õL ˜W¨gÐ6Ñ6Ô6€FØ×ÒØØØ-Ø$Ø(ØØð ñ ô ð ó    zHlangchain_classic.hub.pull is deprecated. Use the LangSmith SDK instead.)Úinclude_modelr   r   Úowner_repo_commitr$   úbool | Nonec               óR   — t          ||¬¦  «        }|                     | |¬¦  «        S )uH  Pull an object from the hub and returns it as a LangChain object.

    !!! danger "Hub manifests are untrusted input"

        Treat every prompt pulled from the hub as untrusted, regardless of
        the owner. Public prompts authored by other users are obviously
        external content, but prompts from your own account â€” or your
        organization's account â€” are also unsafe if that account, a
        teammate's account, or the upstream prompt has been compromised.
        A single malicious commit to a prompt your code pulls is enough to
        execute attacker-controlled configuration on every machine that runs
        `pull()`.

        `pull()` deserializes the manifest via `load()`, so the
        `langchain_core.load.load` threat model applies â€” a manifest can
        intentionally configure a model with a custom base URL, headers,
        model name, or other constructor arguments. These are supported
        features, but they also mean the prompt contents are executable
        configuration rather than plain text: a compromised prompt can
        redirect API traffic, inject headers, or trigger arbitrary code paths
        in the classes it instantiates.

        Prefer the LangSmith SDK directly. If you must use `pull()`, pin the
        commit hash, audit the manifest before deserializing, and never run
        it against an account whose access controls you cannot vouch for.

    Args:
        owner_repo_commit: The full name of the prompt to pull from in the format of
            `owner/prompt_name:commit_hash` or `owner/prompt_name`
            or just `prompt_name` if it's your own prompt.
        include_model: Whether to include the model configuration in the pulled
            prompt. When `True`, the model declared by the prompt is also
            deserialized.
        api_url: 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: The API key to use to authenticate with the LangChain Hub API.

    Returns:
        The pulled LangChain object.
    r   )r$   )r   Úpull_prompt)r%   r$   r   r   r    s        r!   Úpullr)   >   s1   € õl ˜W¨gÐ6Ñ6Ô6€FØ×ÒÐ/¸}ÐÑMÔMÐMr#   )r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )
r%   r   r$   r&   r   r   r   r   r   r   )Ú__doc__Ú
__future__r   Úcollections.abcr   Útypingr   Úlangchain_core._api.deprecationr   Ú	langsmithr   r   r"   r)   © r#   r!   ú<module>r1      s(  ðØ JÐ Jà "Ð "Ð "Ð "Ð "Ð "à $Ð $Ð $Ð $Ð $Ð $Ø Ð Ð Ð Ð Ð à 6Ð 6Ð 6Ð 6Ð 6Ð 6Ø /Ð /Ð /Ð /Ð /Ð /ð €Ø
ØàRð	ñ ô ð ØØ&Ø$Ø'+ØØ!%ð(ð (ð (ð (ð (ñô ð(ðV €Ø
ØàRð	ñ ô ð "&ØØð0Nð 0Nð 0Nð 0Nð 0Nñô ð0Nð 0Nð 0Nr#   