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. |
is_public | Optional[bool] | Default: NoneWhether the prompt should be public. If For new prompts, Set to |
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. |