整合
Dify
在 Dify 中匯入 OpenAPI schema,把 Thunderbit 加成自訂工具
Dify 可以把外部 API 註冊成 自訂工具,任何 agent 或 workflow 都能呼叫。把 Thunderbit 的 OpenAPI 規範丟進去就好。
加入工具
- Tools → Custom → Create custom tool
- Schema → 貼上 Thunderbit OpenAPI 規範(或下面只含
/distill的精簡版) - Authentication → API Key in header:
- Key:
Authorization - Value:
Bearer YOUR_API_KEY
- Key:
最小 schema(只含 /distill)
openapi: 3.0.0
info: { title: Thunderbit, version: "1" }
servers:
- url: https://openapi.thunderbit.com/openapi/v1
paths:
/distill:
post:
operationId: distill
summary: Fetch a URL and return clean Markdown
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [url]
properties:
url: { type: string, format: uri }
renderMode: { type: string, enum: [basic, advanced], default: basic }
responses:
"200":
description: OK在 Agent 中使用
在 Dify 的 Agent 或 Chatflow 裡,把 distill 工具拖進工具集。提示詞範例:
"使用者問到 URL 時,呼叫
distill,根據回傳的 Markdown 來回答。"
在 Workflow 中使用
做 RAG 風格的入庫:Knowledge 節點 ← distill.data.markdown ← Start 節點的 URL 輸入。批次的話換成 /batch/distill,加一個 Loop 節點輪詢 /batch/{jobId} 直到 COMPLETED。