Nodes

Nodes are the fundamental building blocks within Workflows in Lleverage. Each workflow is composed of interlinked nodes, starting with a trigger and ending with a response. Nodes allow you to perform specific tasks, process data, and link different actions together, enabling the creation of complex AI features.

Lleverage provides a broad set of out-of-the-box nodes designed to cover most use cases, from simple logic control to advanced AI model interactions.

Types of Nodes

Nodes come in different categories based on their function within the workflow. These are the main types:

1. Controls

Control the execution flow of your workflow. These nodes manage conditions, iterations, and workflow logic:

  • Branch: Create conditional paths to handle different outcomes based on logic or data.

  • Repeat: Repeat a set of actions for a fixed number of times.

  • Loop: Execute a sequence of nodes repeatedly until a condition is met.

  • Response: Defines how the workflow outputs the result, typically at the end of the workflow.

2. Tools

Tool nodes perform specific tasks, enabling your workflows to interact with data, external services, or perform utility operations:

  • First Defined: Returns the first non-null value from a set of inputs.

  • HTTP Request: Sends an HTTP request to an external service.

  • Vector Store Similarity Search: Performs a query against your Lleverage vector store to find similar entries.

  • Extract Text from Web Page: Extracts text from a given URL, optionally including linked pages.

  • JavaScript: Execute custom JavaScript code within the workflow.

  • Database Query: Executes a query against a connected database.

  • Document Parser: Parses documents to extract structured data (e.g., PDFs, Word files).

  • Alias: Allows you to create an alias for a node, making workflows easier to manage.

3. Prompts

Prompt Nodes are dedicated to generative AI tasks. These nodes encapsulate calls to AI models, such as language models (LLMs) or text-to-image generators. Prompts are reusable across different workflows and include tools to optimize for cost, quality, and performance.

  • These nodes help you leverage AI services like text generation, image creation, or speech synthesis directly within your workflows.

4. Links

Links are the connections between nodes, facilitating the flow of data from one node to the next. Links carry the output from one node as the input to another, enabling the construction of complex chains of functionality. There are two types of data that can pass through links:

  • Data blocks: Transfer complete sets of data, such as JSON objects, strings, or file blobs.

  • Data streams: Stream continuous data, such as text or audio streams, between compatible nodes.

Streaming is especially useful for reducing latency in real-time applications, like live translation or transcription workflows.

Last updated