langfuse.api.prompt_version.client
Retrieves a raw implementation of this client that returns raw responses.
Returns
RawPromptVersionClient
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
Prompt
Examples
from langfuse import LangfuseAPI
client = LangfuseAPI( x_langfuse_sdk_name="YOUR_X_LANGFUSE_SDK_NAME", x_langfuse_sdk_version="YOUR_X_LANGFUSE_SDK_VERSION", x_langfuse_public_key="YOUR_X_LANGFUSE_PUBLIC_KEY", username="YOUR_USERNAME", password="YOUR_PASSWORD", base_url="https://yourhost.com/path/to/api", ) client.prompt_version.update( name="name", version=1, new_labels=["newLabels", "newLabels"], )
Retrieves a raw implementation of this client that returns raw responses.
Returns
AsyncRawPromptVersionClient
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
Prompt
Examples
import asyncio
from langfuse import AsyncLangfuseAPI
client = AsyncLangfuseAPI( x_langfuse_sdk_name="YOUR_X_LANGFUSE_SDK_NAME", x_langfuse_sdk_version="YOUR_X_LANGFUSE_SDK_VERSION", x_langfuse_public_key="YOUR_X_LANGFUSE_PUBLIC_KEY", username="YOUR_USERNAME", password="YOUR_PASSWORD", base_url="https://yourhost.com/path/to/api", )
async def main() -> None: await client.prompt_version.update( name="name", version=1, new_labels=["newLabels", "newLabels"], )
asyncio.run(main())