InternalCreates a new PromptManager instance.
Configuration object containing the API client
Creates a new prompt in Langfuse.
The prompt data to create (chat prompt)
Promise that resolves to a ChatPromptClient
Creates a new prompt in Langfuse.
The prompt data to create (text prompt)
Promise that resolves to a TextPromptClient
Creates a new prompt in Langfuse.
The prompt data to create (chat prompt)
Promise that resolves to a ChatPromptClient
Retrieves a text prompt by name.
Name of the prompt to retrieve
Optionaloptions: {Optional retrieval configuration
OptionalcacheTtlSeconds?: numberCache TTL in seconds (0 to disable caching)
Optionalfallback?: stringFallback text content if prompt fetch fails
OptionalfetchTimeoutMs?: numberRequest timeout in milliseconds
Optionallabel?: stringLabel to filter by
OptionalmaxRetries?: numberMaximum retry attempts for failed requests
Optionaltype?: "text"Specify text prompt type
Optionalversion?: numberSpecific version to retrieve (defaults to latest)
Promise that resolves to a TextPromptClient
Retrieves a chat prompt by name.
Name of the prompt to retrieve
Optionaloptions: {Optional retrieval configuration
OptionalcacheTtlSeconds?: numberCache TTL in seconds (0 to disable caching)
Optionalfallback?: ChatMessage[]Fallback chat messages if prompt fetch fails
OptionalfetchTimeoutMs?: numberRequest timeout in milliseconds
Optionallabel?: stringLabel to filter by
OptionalmaxRetries?: numberMaximum retry attempts for failed requests
Specify chat prompt type
Optionalversion?: numberSpecific version to retrieve (defaults to latest)
Promise that resolves to a ChatPromptClient
Updates the labels of an existing prompt version.
Update parameters
Name of the prompt to update
New labels to apply to the prompt version
Version number of the prompt to update
Promise that resolves to the updated prompt
Manager for prompt operations in Langfuse.
Provides methods to create, retrieve, and manage prompts with built-in caching for optimal performance. Supports both text and chat prompts with variable substitution and placeholder functionality.