Skip to content

Blocks

Blocks are the fundamental building units in WaiNao. Each block performs a specific task and can be connected to other blocks to create workflows.

Block Types

Generation Blocks

Generate text using AI models.

PropertyTypeDescription
promptstringThe input prompt
modelstringAI model to use
temperaturenumberCreativity level (0-1)

Code Blocks

Execute custom JavaScript/TypeScript code.

typescript
// Example code block
function process(input: string): string {
  return input.toUpperCase();
}

Control Blocks

Control the flow of execution:

  • Loop: Repeat actions
  • Condition: Branch based on conditions
  • Parallel: Run blocks in parallel

Connecting Blocks

Blocks are connected through their inputs and outputs. The output of one block becomes the input of the next.