Skip to content

Instantly share code, notes, and snippets.

@xlsama
Last active April 27, 2025 07:45
Show Gist options
  • Save xlsama/f9090e1d35b2e9fc017cd66ad6f0aa83 to your computer and use it in GitHub Desktop.
Save xlsama/f9090e1d35b2e9fc017cd66ad6f0aa83 to your computer and use it in GitHub Desktop.
根据 URL 生成 llm.txt

请处理从以下URL提供的网站内容。

目标URL: https://deepwiki.com/open-webui/open-webui

遵循以下步骤:

访问目标URL并提取其文本内容。

识别目标URL页面上的主要导航链接,这些链接指向同一网站内的其他关键部分或页面。这些通常在主菜单、侧边栏或显眼的目录中找到。

对于您识别出的每个关键链接页面,访问它们并提取其主要文本内容

将从初始目标URL和后续关键页面提取的所有文本内容汇总到一个 llm.txt文件 中,每读取一个网址后就写入到文件中,不要把所有内容一起写入,这样上下文太大,会导致崩溃。

清晰地结构化输出。在每个页面检索的内容之前,包括一个分隔线以指示来源,例如:

--- 页面: [页面标题或URL] ---

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment