集成

Dify

导入 OpenAPI schema,把 Thunderbit 加成 Dify 自定义 Tool

Dify 允许你把外部 API 注册成 自定义 Tool,agent 或 workflow 都能调用。把 Thunderbit 的 OpenAPI 规范丢进去就行。

添加 Tool

  1. Tools → Custom → Create custom tool
  2. Schema → 粘贴 Thunderbit OpenAPI 规范(或者只贴下面 /distill 这一段)
  3. Authentication → Header 里塞 API Key:
    • Key:Authorization
    • Value:Bearer YOUR_API_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 的 AgentChatflow 里,把 distill Tool 拖进 toolset。Prompt 示例:

"用户问到 URL 时,调用 distill,根据返回的 Markdown 回答。"

在 Workflow 里用

RAG 入库场景:Knowledge 节点 ← distill.data.markdown ← Start 节点的 URL 输入。批量场景换成 /batch/distill,再加一个 Loop 节点轮询 /batch/{jobId}COMPLETED

相关链接