TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: PACman: Automatically convert prompts to Python functions

1 点作者 aquajet大约 2 年前
I made a package to automatically convert prompts stored in a yaml file to pure python functions.<p>A lot of prompt-heavy code is hard to grasp due to mixed use of large multi-line strings and orchestrating code. Some prompt libraries automate portions of these away, but we lose flexibility in prompting.<p>By extrapolating the prompt config to a yaml file and generating pure Python functions from it, we can focus our business code on orchestrating the input&#x2F;outputs of prompt functions.<p>Another benefit of moving prompts to YAML files is that it&#x27;s easy to move prompts between languages, and to track prompt changes via git.

暂无评论

暂无评论