import warnings
warnings.filterwarnings("ignore",
                        message="Core Pydantic V1 functionality isn't compatible with Python 3.14")

# 方式2：外部加载Prompt,将 prompt 保存为 yaml
from langchain_core.prompts import load_prompt

template = load_prompt("prompt.yaml", encoding="utf-8")
print(template.format(name="年轻人", what="滑稽"))
# 请年轻人讲一个滑稽的故事


