langsmith.client.Client.create_prompt#

Client.create_prompt(prompt_identifier: str, *, description: str | None = None, readme: str | None = None, tags: Sequence[str] | None = None, is_public: bool = False) Prompt[source]#

Create a new prompt.

Does not attach prompt object, just creates an empty prompt.

Parameters:
  • prompt_name (str) – The name of the prompt.

  • description (Optional[str]) – A description of the prompt.

  • readme (Optional[str]) – A readme for the prompt.

  • tags (Optional[Sequence[str]]) – A list of tags for the prompt.

  • is_public (bool) – Whether the prompt should be public. Defaults to False.

  • prompt_identifier (str) –

Returns:

The created prompt object.

Return type:

ls_schemas.Prompt

Raises:
  • ValueError – If the current tenant is not the owner.

  • HTTPError – If the server request fails.