llms.txt。當你的工具可以擷取完整文件文字,用於檢索、問答或程式編碼協助時,請使用 llms-full.txt。
取得精簡索引
以下請求會下載 CometAPI 的llms.txt 索引:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
將 CometAPI 的 llms.txt 與 llms-full.txt 用於程式編碼助理、檢索系統與模型 Prompt。
llms.txt。當你的工具可以擷取完整文件文字,用於檢索、問答或程式編碼協助時,請使用 llms-full.txt。
llms.txt 索引:
curl https://apidoc.cometapi.com/llms.txt
# CometAPI Documentation
> CometAPI developer documentation for unified API access...
## Docs
- [Create a new API key](https://apidoc.cometapi.com/api/api-keys/create-api-key.md)
curl https://apidoc.cometapi.com/llms-full.txt
# Create a new API key
Source: https://apidoc.cometapi.com/api/api-keys/create-api-key
Create a new CometAPI API key for the authenticated account.
from pathlib import Path
import requests
url = "https://apidoc.cometapi.com/llms-full.txt"
response = requests.get(url, timeout=60)
response.raise_for_status()
Path("cometapi-docs.txt").write_text(response.text, encoding="utf-8")
print(len(response.text))
449946
| 錯誤 | 修正方式 |
|---|---|
| 工具上下文過小 | 先使用 llms.txt,再僅擷取相關的連結頁面。 |
| 完整文字過大 | 在建立索引前,先依標題或來源 URL 將 llms-full.txt 分塊。 |
| 本機快取損毀 | 在你的文件同步工作期間重新整理該檔案。 |
| AI 結果中缺少頁面 | 確認該頁面有出現在導覽中,且也存在於 llms.txt。 |