Files
talemate/docs/user-guide/node-editor/reference/nodes/data-number.md
veguAI 89e01ac138 Node editor node reference glossary (#107) (#111)
* docs: complete node editor node reference glossary (#107) - generated by new nodes.tools glossary subcommand, 47 categorized pages covering all 403 nodes, docstring gap fixes, help-agent docs-index entries

* docs: fix Jinja2 Format discoverability - document dynamic-input template variables, move node to string page, link key inference from dynamic-input notes, strip links from index summaries

* help agent: keep node reference out of the chat prompt - collapse glossary entries to one pointer line (~19k chars saved), agent retrieves node info via search_docs/read_doc tool calls

* help agent: replace in-prompt docs index with find_docs lookup tool - prompt carries a 13-line section overview (~1.5k chars vs ~66k), pages located via keyword-scored find_docs at runtime

* changelog: help agent prompt slimming + find_docs lookup

* docs: sort node reference index and nav alphabetically by page title

* review: move module constants into top-of-file constant blocks (glossary MAX_DEFAULT_LENGTH; docs SECTION_DESCRIPTIONS, _FIND_STOPWORDS, FIND_DOCS_LIMIT)

* review: word-boundary find_docs scoring with plural/-ing folds, find_docs+section_overview unit tests, jinja2 template field description override

* docs: help agent overview no longer claims an in-prompt index of all documentation pages

* docs: full node docstring audit pass - 335 classes audited by 5 agents, ~89 accuracy fixes (nonexistent/misnamed sockets, wrong behavior claims), ~94 expansions, 5 factually-wrong PropertyField descriptions corrected, glossary regenerated
2026-07-20 01:49:33 +03:00

7.5 KiB

Number Nodes

Numeric values: conversion, arithmetic, comparison, clamping, averaging and random numbers.

9 nodes.

Node Registry path
As Number data/number/AsNumber
Average data/number/Average
Basic Arithmetic data/number/BasicArithmetic
Clamp data/number/Clamp
Compare data/number/Compare
Make Number data/number/Make
Min Max data/number/MinMax
Random data/number/Random
Sum data/number/Sum

As Number

data/number/AsNumber

Converts a value to a number

Converts a value to a number, handling both string and numeric inputs. A value that cannot be converted raises an error.

Inputs

Input Type Description
value any The value to convert to a number
default any Fallback value used when value is unresolved or None

Outputs

Output Type Description
value int,float The converted number value

Properties

Property Type Default Description
number_type str "int" Type of number to create. Choices: int, float.

Average

data/number/Average

Calculates average of a list of numbers

Calculates one of three types of average (mean, median, or mode) from a list of numeric values.

Inputs

Input Type Description
numbers list List of numbers to calculate average from

Outputs

Output Type Description
result int,float The calculated average value (mode yields None when there is no unique mode)

Properties

Property Type Default Description
method str "mean" Type of average to calculate. Choices: mean, median, mode.

Basic Arithmetic

data/number/BasicArithmetic

Performs basic arithmetic operations

Performs one of the following operations on two input values: add, subtract, multiply, divide, power, or modulo.

Inputs

Input Type Description
a int,float First operand (number)
b int,float Second operand (number)

Outputs

Output Type Description
result int,float Result of the arithmetic operation (division or modulo by zero raises an error)

Properties

Property Type Default Description
operation str "add" Arithmetic operation to perform. Choices: add, subtract, multiply, divide, power, modulo.
a number 0 First operand
b number 0 Second operand

Clamp

data/number/Clamp

Constrains a number within a specified range

Takes a value and ensures it falls within a specific minimum and maximum range. If the value is below the minimum, it returns the minimum. If it's above the maximum, it returns the maximum.

Inputs

Input Type Description
value int,float The number to constrain
min int,float Minimum allowed value
max int,float Maximum allowed value

Outputs

Output Type Description
result int,float The value constrained to the specified range

Properties

Property Type Default Description
value number 0 The number to constrain
min number 0 Minimum allowed value
max number 1 Maximum allowed value

Compare

data/number/Compare

Compares two numbers

Performs comparison operations between two numeric values with optional tolerance for floating point comparisons.

Inputs

Input Type Description
a int,float First value to compare (number)
b int,float Second value to compare (number)

Outputs

Output Type Description
result bool Boolean result of the comparison

Properties

Property Type Default Description
operation str "equals" Comparison operation to perform. Choices: equals, not_equals, greater_than, less_than, greater_equal, less_equal.
tolerance float 0.0001 Tolerance for floating point comparison
a number 0 First value to compare
b number 0 Second value to compare

Make Number

data/number/Make

Creates a number with a specified value

Creates either an integer or floating point number with the specified value.

Outputs

Output Type Description
value any The created number value

Properties

Property Type Default Description
value number 0 The numeric value to create
number_type str "float" Type of number to create. Choices: int, float.

Min Max

data/number/MinMax

Finds minimum or maximum in a list of numbers

Takes a list of numbers and finds either the minimum or maximum value, returning both the value and its index in the list.

Inputs

Input Type Description
numbers list List of numbers to analyze

Outputs

Output Type Description
result int,float The minimum or maximum value
index int The index position of the minimum or maximum value in the list

Properties

Property Type Default Description
operation str "min" Operation to perform. Choices: min, max.

Random

data/number/Random

Generates random numbers

Generates random numbers using various distributions (uniform, integer, normal) or selects a random item from a list of choices.

Inputs

Input Type Description
min int,float Minimum value for uniform/integer distribution (optional)
max int,float Maximum value for uniform/integer distribution (optional)
mean int,float Mean value for normal distribution (optional)
std_dev int,float Standard deviation for normal distribution (optional)
choices list List to select a random item from (optional)

Outputs

Output Type Description
result int,float The generated random number or selected item

Properties

Property Type Default Description
method str "uniform" Type of random number to generate. Choices: uniform, integer, normal, choice.
min float 0.0 Minimum value for uniform/integer distribution
max float 1.0 Maximum value for uniform/integer distribution
mean float 0.0 Mean value for normal distribution
std_dev float 1.0 Standard deviation for normal distribution

Sum

data/number/Sum

Sums a list of numbers

Calculates the sum of all values in a list of numbers.

Inputs

Input Type Description
numbers list List of numbers to sum

Outputs

Output Type Description
result int,float The sum of all numbers in the list

Properties

Property Type Default Description
numbers list [] numbers