Edit on GitHub

langfuse.api.prompt_version.raw_client

OMIT = Ellipsis
class RawPromptVersionClient:
RawPromptVersionClient( *, client_wrapper: langfuse.api.core.client_wrapper.SyncClientWrapper)
def update( self, name: str, version: int, *, new_labels: Sequence[str], request_options: Optional[langfuse.api.core.request_options.RequestOptions] = None) -> langfuse.api.core.http_response.HttpResponse[typing.Annotated[typing.Union[langfuse.api.Prompt_Chat, langfuse.api.Prompt_Text], FieldInfo(annotation=NoneType, required=True, discriminator='type')]]:

Update labels for a specific prompt version

Parameters

name : str The name of the prompt. If the prompt is in a folder (e.g., "folder/subfolder/prompt-name"), the folder path must be URL encoded.

version : int Version of the prompt to update

new_labels : typing.Sequence[str] New labels for the prompt version. Labels are unique across versions. The "latest" label is reserved and managed by Langfuse.

request_options : typing.Optional[RequestOptions] Request-specific configuration.

Returns

HttpResponse[Prompt]

class AsyncRawPromptVersionClient:
AsyncRawPromptVersionClient( *, client_wrapper: langfuse.api.core.client_wrapper.AsyncClientWrapper)
async def update( self, name: str, version: int, *, new_labels: Sequence[str], request_options: Optional[langfuse.api.core.request_options.RequestOptions] = None) -> langfuse.api.core.http_response.AsyncHttpResponse[typing.Annotated[typing.Union[langfuse.api.Prompt_Chat, langfuse.api.Prompt_Text], FieldInfo(annotation=NoneType, required=True, discriminator='type')]]:

Update labels for a specific prompt version

Parameters

name : str The name of the prompt. If the prompt is in a folder (e.g., "folder/subfolder/prompt-name"), the folder path must be URL encoded.

version : int Version of the prompt to update

new_labels : typing.Sequence[str] New labels for the prompt version. Labels are unique across versions. The "latest" label is reserved and managed by Langfuse.

request_options : typing.Optional[RequestOptions] Request-specific configuration.

Returns

AsyncHttpResponse[Prompt]