Internal
Creates 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
Optional
options: {Optional retrieval configuration
Optional
cacheTtlSeconds?: numberCache TTL in seconds (0 to disable caching)
Optional
fallback?: stringFallback text content if prompt fetch fails
Optional
fetchTimeoutMs?: numberRequest timeout in milliseconds
Optional
label?: stringLabel to filter by
Optional
maxRetries?: numberMaximum retry attempts for failed requests
Optional
type?: "text"Specify text prompt type
Optional
version?: 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
Optional
options: {Optional retrieval configuration
Optional
cacheTtlSeconds?: numberCache TTL in seconds (0 to disable caching)
Optional
fallback?: ChatMessage[]Fallback chat messages if prompt fetch fails
Optional
fetchTimeoutMs?: numberRequest timeout in milliseconds
Optional
label?: stringLabel to filter by
Optional
maxRetries?: numberMaximum retry attempts for failed requests
Specify chat prompt type
Optional
version?: 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.