Integrazioni

Flowise

Incapsula Thunderbit come Custom Tool Flowise per chain e Agent

Flowise è un builder drag-and-drop sopra LangChain. Usa il nodo Custom Tool per esporre /distill a qualsiasi chain o Agent sul canvas.

Crea il Custom Tool

Tools → Custom Tool → Add new

  • Tool name: read_url
  • Tool description: Fetch a URL and return clean Markdown for the agent to read.
  • Input schema (JSON):
{
  "type": "object",
  "required": ["url"],
  "properties": {
    "url":        { "type": "string" },
    "renderMode": { "type": "string", "enum": ["basic", "advanced"], "default": "basic" }
  }
}
  • JavaScript function:
const res = await fetch('https://openapi.thunderbit.com/openapi/v1/distill', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${$vars.THUNDERBIT_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ url: $url, renderMode: $renderMode || 'basic' }),
});
const json = await res.json();
return json.data.markdown;

Conserva l'API Key sotto Variables come THUNDERBIT_API_KEY così non resta hard-coded.

Collega in una chain

Trascina il Tool read_url in un nodo Agent o Tool Agent insieme al tuo LLM (OpenAI, Anthropic, Ollama). L'Agent lo prende automaticamente.

Suggerimenti

  • Per ingestion RAG, abbinalo alla famiglia Document loader — chiama read_url in un nodo custom, manda il Markdown a un Recursive Character Text Splitter, poi a un vector store
  • Le pagine lunghe possono saturare il context dell'Agent — tronca a ~8k caratteri nel Custom Tool prima di restituire

Correlati