我构建了这个新插件来练习我添加到LLM 0.24 的新的register_fragment_loaders()插件挂钩。它是相当于Bash 脚本的插件,我过去 18 个月一直用它来总结Hacker News对话。
你可以这样使用它:
llm install llm-hacker-news llm -f hn:43615912 'summary with illustrative direct quotes'
您可以在本期中看到输出。
该插件注册一个hn:
前缀 – 将其与 Hacker News 对话的 ID 结合起来,将该对话拉入上下文中。
它使用 Algolia Hacker News API,它返回这样的 JSON 。它不是将 JSON 直接提供给 LLM,而是将其转换为希望对 LLM 更友好的格式,类似于插件测试中的示例:
[1] BeakMaster: Fish Spotting Techniques [1.1] CoastalFlyer: The dive technique works best when hunting in shallow waters. [1.1.1] PouchBill: Agreed. Have you tried the hover method near the pier? [1.1.2] WingSpan22: My bill gets too wet with that approach. [1.1.2.1] CoastalFlyer: Try tilting at a 40° angle like our Australian cousins. [1.2] BrownFeathers: Anyone spotted those "silver fish" near the rocks? [1.2.1] GulfGlider: Yes! They're best caught at dawn. Just remember: swoop > grab > lift
这种格式是由克劳德(Claude)建议的,然后他为我编写了大部分插件实现。这是克劳德的文字记录。
标签: llm 、插件、黑客新闻、 ai 、 llms 、人工智能辅助编程、生成人工智能、项目、人类、克劳德
原文: https://simonwillison.net/2025/Apr/8/llm-hacker-news/#atom-everything