Skip to content

Commit 5f0c520

Browse files
authored
docs(api): document nodes with examples (#147)
2 parents 03ab045 + aa4ed6b commit 5f0c520

249 files changed

Lines changed: 3867 additions & 249 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/api/src/nodes/audio/audio-recorder-node.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ export class AudioRecorderNode extends ExecutableNode {
1616
description: "A widget for recording audio from the microphone",
1717
tags: ["Audio"],
1818
icon: "mic",
19-
documentation: "*Missing detailed documentation*",
19+
documentation: `This node provides an audio recorder widget that allows users to record audio from their microphone and outputs the recording.
20+
21+
## Usage Example
22+
23+
- **Input**: Audio recording from microphone
24+
- **Output**: Audio reference that can be used by other audio nodes`,
2025
inputs: [
2126
{
2227
name: "value",

apps/api/src/nodes/audio/melotts-node.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ export class MelottsNode extends ExecutableNode {
1414
description: "Converts text to natural-sounding speech using MeloTTS",
1515
tags: ["Audio", "AI"],
1616
icon: "mic",
17-
documentation: "*Missing detailed documentation*",
17+
documentation: `This node converts text to natural-sounding speech using the MeloTTS model, supporting multiple languages.
18+
19+
## Usage Example
20+
21+
- **Input**: prompt: \`"Hello, how are you today?"\`, lang: \`"en"\`
22+
- **Output**: MP3 audio file with synthesized speech`,
1823
computeCost: 10,
1924
inputs: [
2025
{

apps/api/src/nodes/audio/whisper-large-v3-turbo-node.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ export class WhisperLargeV3TurboNode extends ExecutableNode {
1616
"Transcribes speech from audio files using OpenAI's Whisper Large V3 Turbo model with enhanced performance",
1717
tags: ["Audio", "AI"],
1818
icon: "mic",
19-
documentation: "*Missing detailed documentation*",
19+
documentation: `This node transcribes speech from audio files using OpenAI's Whisper Large V3 Turbo model, providing enhanced accuracy and multilingual support.
20+
21+
## Usage Example
22+
23+
- **Input**: audio file with task: \`"transcribe"\`, language: \`"en"\`
24+
- **Output**: \`"High-quality transcription with enhanced accuracy."\``,
2025
computeCost: 10,
2126
inputs: [
2227
{

apps/api/src/nodes/audio/whisper-node.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@ export class WhisperNode extends ExecutableNode {
1515
"Transcribes speech from audio files using OpenAI's Whisper model",
1616
tags: ["Audio", "AI"],
1717
icon: "mic",
18-
documentation: "*Missing detailed documentation*",
18+
documentation: `This node transcribes speech from audio files using OpenAI's Whisper model, converting spoken words to text.
19+
20+
## Usage Example
21+
22+
- **Input**: audio file (MP3, WAV, etc.)
23+
- **Output**: \`"Hello, this is a transcription of the audio content."\`
24+
`,
1925
computeCost: 10,
2026
inputs: [
2127
{

apps/api/src/nodes/audio/whisper-tiny-en-node.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ export class WhisperTinyEnNode extends ExecutableNode {
1515
"Transcribes English speech from audio files using OpenAI's Whisper Tiny English model - optimized for English speech recognition",
1616
tags: ["Audio", "AI"],
1717
icon: "mic",
18-
documentation: "*Missing detailed documentation*",
18+
documentation: `This node transcribes English speech from audio files using OpenAI's Whisper Tiny English model, optimized specifically for English speech recognition.
19+
20+
## Usage Example
21+
22+
- **Input**: English audio file (MP3, WAV, etc.)
23+
- **Output**: \`"Hello, this is English speech transcription."\``,
1924
computeCost: 10,
2025
inputs: [
2126
{

apps/api/src/nodes/browser/cloudflare-browser-content-node.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,17 @@ export class CloudflareBrowserContentNode extends ExecutableNode {
1616
"Fetch fully rendered HTML from a URL using Cloudflare Browser Rendering.",
1717
tags: ["Browser"],
1818
icon: "globe",
19-
documentation: "*Missing detailed documentation*",
19+
documentation: `This node fetches fully rendered HTML from a URL using Cloudflare Browser Rendering.
20+
21+
## Usage Example
22+
23+
- **Input**:
24+
\`\`\`
25+
{
26+
"url": "https://example.com"
27+
}
28+
\`\`\`
29+
- **Output**: \`"<html>...</html>"\` (fully rendered HTML content)`,
2030
computeCost: 10,
2131
asTool: true,
2232
inputs: [

apps/api/src/nodes/browser/cloudflare-browser-json-node.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,24 @@ export class CloudflareBrowserJsonNode extends ExecutableNode {
1616
"Fetch JSON from a rendered page using Cloudflare Browser Rendering.",
1717
tags: ["Browser"],
1818
icon: "braces",
19-
documentation: "*Missing detailed documentation*",
19+
documentation: `This node fetches JSON from a rendered page using Cloudflare Browser Rendering.
20+
21+
## Usage Example
22+
23+
- **Input**:
24+
\`\`\`
25+
{
26+
"url": "https://example.com",
27+
"prompt": "Extract the title and description from this page"
28+
}
29+
\`\`\`
30+
- **Output**:
31+
\`\`\`
32+
{
33+
"title": "Example Page",
34+
"description": "This is an example page"
35+
}
36+
\`\`\``,
2037
computeCost: 10,
2138
asTool: true,
2239
inputs: [

apps/api/src/nodes/browser/cloudflare-browser-links-node.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,21 @@ export class CloudflareBrowserLinksNode extends ExecutableNode {
1616
"Fetch all links from a rendered page using Cloudflare Browser Rendering.",
1717
tags: ["Browser"],
1818
icon: "link",
19-
documentation: "*Missing detailed documentation*",
19+
documentation: `This node extracts all links from a web page using Cloudflare's Browser Rendering API.
20+
21+
## Usage Example
22+
23+
- **Input**: \`"https://example.com"\`
24+
- **Output**:
25+
\`\`\`
26+
[
27+
"https://example.com/page1",
28+
"https://example.com/page2",
29+
"https://external-site.com"
30+
]
31+
\`\`\`
32+
33+
The node renders the page in a headless browser and extracts all href attributes from anchor tags.`,
2034
computeCost: 10,
2135
asTool: true,
2236
inputs: [

apps/api/src/nodes/browser/cloudflare-browser-markdown-node.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,23 @@ export class CloudflareBrowserMarkdownNode extends ExecutableNode {
1616
"Fetch markdown from a rendered page using Cloudflare Browser Rendering.",
1717
tags: ["Browser"],
1818
icon: "file-text",
19-
documentation: "*Missing detailed documentation*",
19+
documentation: `This node converts web pages to Markdown format using Cloudflare's Browser Rendering API.
20+
21+
## Usage Example
22+
23+
- **Input**: \`"https://example.com"\`
24+
- **Output**:
25+
\`\`\`
26+
# Example Page
27+
28+
This is the main content of the page.
29+
30+
## Section 1
31+
32+
Some content here...
33+
\`\`\`
34+
35+
The node renders the page and converts the HTML structure to clean Markdown format.`,
2036
computeCost: 10,
2137
asTool: true,
2238
inputs: [

apps/api/src/nodes/browser/cloudflare-browser-pdf-node.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,14 @@ export class CloudflareBrowserPdfNode extends ExecutableNode {
1616
"Fetch a PDF from a rendered page using Cloudflare Browser Rendering.",
1717
tags: ["Browser"],
1818
icon: "file-text",
19-
documentation: "*Missing detailed documentation*",
19+
documentation: `This node generates PDF documents from web pages using Cloudflare's Browser Rendering API.
20+
21+
## Usage Example
22+
23+
- **Input**: \`"https://example.com"\`
24+
- **Output**: PDF document file
25+
26+
The node renders the page in a headless browser and converts it to a PDF document with proper formatting and styling.`,
2027
computeCost: 10,
2128
inputs: [
2229
{

0 commit comments

Comments
 (0)