template_id
(str
): The ID of the template to update.name
(str
): The new name for the template.PromptTemplateAPIException
: If the API request fails or returns an error.PromptTemplate
: The updated prompt template.
template
(str
): The template string to render.data
(Union[DatasetData, StringData]
): The data to use for rendering the template. Can be either dataset data or string data.starting_token
(Union[Unset, int]
): Starting token for pagination. Defaults to 0.limit
(Union[Unset, int]
): Maximum number of rendered templates to return. Defaults to 100.PromptTemplateAPIException
: If the API request fails or returns an error.Optional[RenderTemplateResponse]
: The rendered template response if successful, None otherwise.
id
(str
): The unique identifier of the template to retrieve. Defaults to None.name
(str
): The name of the template to retrieve. Defaults to None.version
(int
): The version number to retrieve. If not provided, the currently selected version is returned. Defaults to None.ValueError
: If neither or both ‘id’ and ‘name’ are provided.Optional[PromptTemplateVersion]
: The template version if found, None otherwise.
id
(str
): The unique identifier of the template to delete. Defaults to None.name
(str
): The name of the template to delete. Defaults to None.ValueError
: If neither or both id and name are provided, or if the template is not found.None
:
id
(str
): The unique identifier of the template to update. Defaults to None.name
(str
): The name of the template to update. Defaults to None.new_name
(str
): The new name for the template.ValueError
: If neither or both id and name are provided, or if the template is not found.PromptTemplateAPIException
: If the API request fails or returns an error.PromptTemplate
: The updated prompt template.
name
(str
): The name for the new template.template
(Union[list[Message], str]
): The template content. Can be either a list of Message objects or a JSON string
representing the message structure.PromptTemplateAPIException
: If the API request fails or returns an error.PromptTemplate
: The created prompt template.
name_filter
(Optional[str]
): Filter templates by name containing this string. Defaults to None (no filtering).limit
(Union[Unset, int]
): Maximum number of templates to return. Defaults to 100.list[PromptTemplate]
: List of prompt templates matching the criteria.
template
(str
): The template string to render.data
(Union[DatasetData, StringData, list[str], str]
): The data to use for rendering the template. Can be:starting_token
(Union[Unset, int]
): Starting token for pagination. Defaults to 0.limit
(Union[Unset, int]
): Maximum number of rendered templates to return. Defaults to 100.PromptTemplateAPIException
: If the API request fails or returns an error.Optional[RenderTemplateResponse]
: The rendered template response if successful, None otherwise.