Skip to content

Set Max Tokens Node

AI/Generative/History

Set Max Tokens

Stores the maximum completion tokens allowed for future calls

ai_generative_set_history_max_tokensllm
Inputs3
Outputs2
Security exposure0/10
Packagellm

Ratings

Scores range from 0 to 10. Higher values mean more impact, exposure, or operational weight.

SecurityAttack surface and exposure impact.
0/10High
PrivacyPotential sensitivity of processed data.
0/10High
PerformanceRuntime or resource pressure.
1/10High
GovernancePolicy, audit, or compliance impact.
1/10High
ReliabilityOperational stability considerations.
0/10High
CostExternal or compute cost impact.
0/10High

Input Pins

3

Input

Execution
exec_in

Initiate Execution

History

Struct
history

Existing chat history to update

HistoryHistory19 fields
modelstringrequired
messagesArray<HistoryMessage>required
itemsHistoryMessagearray item
roleRolerequired
enum "system", "user", "assistant", "function"...
contentMessageContentrequired
variant 1stringvariant
variant 2Array<Content>variant
namestring | null
tool_callsarray | null
itemsToolCallarray item
tool_call_idstring | null
+1 more fields
presetstring | null
streamboolean | null
stream_optionsanyOf (2)
variant 1StreamOptionsvariant
include_usagebooleanrequired
variant 2nullvariant
max_completion_tokensinteger | null
format uint32min 0
top_pnumber | null
format float
temperaturenumber | null
format float
thinkinganyOf (2)
variant 1HistoryThinkingvariant
enum "off", "low", "mid", "high"
variant 2nullvariant
seedinteger | null
format uint32min 0
presence_penaltynumber | null
format float
frequency_penaltynumber | null
format float
userstring | null
stoparray | null
itemsstringarray item
response_formatanyOf (2)
variant 1ResponseFormatvariant
variant 1stringvariant
variant 2nullvariant
ninteger | null
format uint32min 0
toolsarray | null
itemsToolarray item
typeToolTyperequired
enum "function"
functionHistoryFunctionrequired
namestringrequired
descriptionstring | null
parametersHistoryFunctionParametersrequired
tool_choiceanyOf (2)
variant 1ToolChoicevariant
variant 1nullvariant
variant 2nullvariant
variant 3nullvariant
variant 4objectvariant
typeToolTyperequired
enum "function"
functionHistoryFunctionrequired
variant 2nullvariant
+1 more fields
Schema enforced

Max Tokens

Integer
max_tokens

Maximum number of completion tokens

Output Pins

2

Output

Execution
exec_out

Signals completion after storing the limit

History

Struct
history_out

History updated with the max tokens limit

HistoryHistory19 fields
modelstringrequired
messagesArray<HistoryMessage>required
itemsHistoryMessagearray item
roleRolerequired
enum "system", "user", "assistant", "function"...
contentMessageContentrequired
variant 1stringvariant
variant 2Array<Content>variant
namestring | null
tool_callsarray | null
itemsToolCallarray item
tool_call_idstring | null
+1 more fields
presetstring | null
streamboolean | null
stream_optionsanyOf (2)
variant 1StreamOptionsvariant
include_usagebooleanrequired
variant 2nullvariant
max_completion_tokensinteger | null
format uint32min 0
top_pnumber | null
format float
temperaturenumber | null
format float
thinkinganyOf (2)
variant 1HistoryThinkingvariant
enum "off", "low", "mid", "high"
variant 2nullvariant
seedinteger | null
format uint32min 0
presence_penaltynumber | null
format float
frequency_penaltynumber | null
format float
userstring | null
stoparray | null
itemsstringarray item
response_formatanyOf (2)
variant 1ResponseFormatvariant
variant 1stringvariant
variant 2nullvariant
ninteger | null
format uint32min 0
toolsarray | null
itemsToolarray item
typeToolTyperequired
enum "function"
functionHistoryFunctionrequired
namestringrequired
descriptionstring | null
parametersHistoryFunctionParametersrequired
tool_choiceanyOf (2)
variant 1ToolChoicevariant
variant 1nullvariant
variant 2nullvariant
variant 3nullvariant
variant 4objectvariant
typeToolTyperequired
enum "function"
functionHistoryFunctionrequired
variant 2nullvariant
+1 more fields

Node Info

Internal name
ai_generative_set_history_max_tokens
Category
AI/Generative/History
Version
1