Skip to content

Commit

Permalink
[Python] push_prompt update
Browse files Browse the repository at this point in the history
Make is_public optional to avoid hiding public prompts unintentonally
  • Loading branch information
hinthornw committed Nov 11, 2024
1 parent 2bf4569 commit 940032d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions python/langsmith/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5611,7 +5611,7 @@ def push_prompt(
*,
object: Optional[Any] = None,
parent_commit_hash: str = "latest",
is_public: bool = False,
is_public: Optional[bool] = None,
description: Optional[str] = None,
readme: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
Expand All @@ -5628,7 +5628,10 @@ def push_prompt(
object (Optional[Any]): The LangChain object to push.
parent_commit_hash (str): The parent commit hash.
Defaults to "latest".
is_public (bool): Whether the prompt should be public. Defaults to False.
is_public (Optional[bool]): Whether 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]): A description of the prompt.
Defaults to an empty string.
readme (Optional[str]): A readme for the prompt.
Expand Down Expand Up @@ -5656,7 +5659,7 @@ def push_prompt(
else:
self.create_prompt(
prompt_identifier,
is_public=is_public,
is_public=is_public if is_public is not None else False,
description=description,
readme=readme,
tags=tags,
Expand Down

0 comments on commit 940032d

Please sign in to comment.