langfuse-prompt-view
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLangfuse Prompt View
Langfuse提示词查看工具
Display the content of a specific prompt.
显示特定提示词的内容。
Setup
配置步骤
Set the following environment variables before use:
| Variable | Required | Description |
|---|---|---|
| Yes | Langfuse public key |
| Yes | Langfuse secret key |
| No | Langfuse host URL (default: |
使用前请设置以下环境变量:
| 变量 | 是否必填 | 描述 |
|---|---|---|
| 是 | Langfuse公钥 |
| 是 | Langfuse密钥 |
| 否 | Langfuse主机地址(默认值: |
When to Use
使用场景
- Checking prompt content
- Verifying a specific label's version
- Debugging prompts
- 检查提示词内容
- 验证特定标签的版本
- 调试提示词
Commands
命令
1. Show Prompt Content
1. 查看提示词内容
Get the latest version:
bash
npx tsx scripts/langfuse-prompt-view.ts <prompt-name>Get a specific label's version:
bash
npx tsx scripts/langfuse-prompt-view.ts <prompt-name> --label=development
npx tsx scripts/langfuse-prompt-view.ts <prompt-name> --label=production获取最新版本:
bash
npx tsx scripts/langfuse-prompt-view.ts <prompt-name>获取特定标签的版本:
bash
npx tsx scripts/langfuse-prompt-view.ts <prompt-name> --label=development
npx tsx scripts/langfuse-prompt-view.ts <prompt-name> --label=productionOutput Example
输出示例
============================================================
Prompt: librarian-system
Version: 3
Labels: development
============================================================
--- Content ---
You are an excellent librarian...
--- End ---============================================================
Prompt: librarian-system
Version: 3
Labels: development
============================================================
--- Content ---
You are an excellent librarian...
--- End ---Notes
注意事项
- If no label is specified, the latest version is returned
- Specifying a non-existent prompt name or label will result in an error
- 若未指定标签,将返回最新版本
- 若指定不存在的提示词名称或标签,会导致错误