langfuse-prompt-view

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Langfuse Prompt View

Langfuse提示词查看工具

Display the content of a specific prompt.
显示特定提示词的内容。

Setup

配置步骤

Set the following environment variables before use:
VariableRequiredDescription
LANGFUSE_PUBLIC_KEY
YesLangfuse public key
LANGFUSE_SECRET_KEY
YesLangfuse secret key
LANGFUSE_HOST
or
LANGFUSE_BASE_URL
NoLangfuse host URL (default:
https://us.cloud.langfuse.com
)
使用前请设置以下环境变量:
变量是否必填描述
LANGFUSE_PUBLIC_KEY
Langfuse公钥
LANGFUSE_SECRET_KEY
Langfuse密钥
LANGFUSE_HOST
LANGFUSE_BASE_URL
Langfuse主机地址(默认值:
https://us.cloud.langfuse.com

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=production

Output 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
  • 若未指定标签,将返回最新版本
  • 若指定不存在的提示词名称或标签,会导致错误