Push a prompt to the LangSmith API.
Can be used to update prompt metadata or prompt content.
If the prompt does not exist, it will be created. If the prompt exists, it will be updated.
push_prompt(
self,
prompt_identifier: str,
*,
object: Optional[Any] = None,
parent_commit_hash: str = 'latest',
is_public: Optional[bool] = None,
description: Optional[str] = None,
readme: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
commit_tags: Optional[str | list[str]] = None
) -> str| Name | Type | Description |
|---|---|---|
prompt_identifier* | str | The identifier of the prompt. |
object | Optional[Any] | Default: NoneThe LangChain object to push. |
parent_commit_hash | str | Default: 'latest'The parent commit hash. Defaults to "latest". |
is_public | Optional[bool] | Default: NoneWhether the prompt should be public. If None (default), the current visibility status is maintained for existing prompts. For new prompts, None defaults to private. Set to True to make public, or False to make private. |
description | Optional[str] | Default: NoneA description of the prompt. Defaults to an empty string. |
readme | Optional[str] | Default: NoneA readme for the prompt. Defaults to an empty string. |
tags | Optional[Sequence[str]] | Default: NoneA list of tags for the prompt. Defaults to an empty list. |
commit_tags | Optional[str | list[str]] | Default: NoneA single tag or list of tags for the prompt commit. Defaults to an empty list. |