Skip to content

Last Message Node

AI/Generative/Response

Extracts the last assistant message from a response

ai_generative_llm_response_last_messagellm
Inputs1
Outputs2
Security exposure10/10
Packagellm

Ratings

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

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

Input Pins

1

Response

Struct
response

LLM response to inspect

ResponseResponse8 fields
idstring | null
choicesArray<Choice>required
itemsChoicearray item
indexinteger:int32required
format int32
finish_reasonstringrequired
messageResponseMessagerequired
rolestringrequired
contentstring | null
content_partsArray<Content>

Ordered structured content returned by Rig when the assistant response contains media. Text-only responses continue to use `content` alone for OpenAI compatibility.

refusalstring | null
annotationsarray | null
+3 more fields
logprobsanyOf (2)
variant 1LogProbsvariant
variant 2nullvariant
createdinteger | null
format uint64min 0
modelstring | null
service_tierstring | null
system_fingerprintstring | null
objectstring | null
usageUsagerequired
completion_tokensinteger:uint32required
format uint32min 0
prompt_tokensinteger:uint32required
format uint32min 0
total_tokensinteger:uint32required
format uint32min 0
costnumber | null
format double
prompt_tokens_detailsanyOf (2)
variant 1PromptTokenDetailsvariant
cached_tokensinteger | null
format uint32min 0
audio_tokensinteger | null
format uint32min 0
variant 2nullvariant
+2 more fields
Schema enforced

Output Pins

2

Message

Struct
message

Last message from the response

ResponseMessageResponseMessage8 fields
rolestringrequired
contentstring | null
content_partsArray<Content>

Ordered structured content returned by Rig when the assistant response contains media. Text-only responses continue to use `content` alone for OpenAI compatibility.

itemsContentarray item
variant 1objectvariant
typeContentTyperequired
enum "text", "image_url", "audio_url", "video_url"...
textstringrequired
variant 2objectvariant
typeContentTyperequired
enum "text", "image_url", "audio_url", "video_url"...
image_urlImageUrlrequired
variant 3objectvariant
typeContentTyperequired
enum "text", "image_url", "audio_url", "video_url"...
audio_urlstringrequired
media_typestring | null
variant 4objectvariant
typeContentTyperequired
enum "text", "image_url", "audio_url", "video_url"...
video_urlstringrequired
media_typestring | null
variant 5objectvariant
typeContentTyperequired
enum "text", "image_url", "audio_url", "video_url"...
document_urlstringrequired
media_typestring | null
refusalstring | null
annotationsarray | null
itemsAnnotationarray item
typestringrequired
url_citationanyOf (2)
variant 1UrlCitationvariant
variant 2nullvariant
audioanyOf (2)
variant 1Audiovariant
datastringrequired
expires_atinteger | null
format uint64min 0
idstringrequired
transcriptstring | null
variant 2nullvariant
reasoningstring | null
tool_callsArray<FunctionCall>required
itemsFunctionCallarray item
indexinteger | null
format int32
idstringrequired
typestring | null
functionResponseFunctionrequired
namestringrequired
argumentsstringrequired

Success

Boolean
success

Whether a message was successfully extracted

Node Info

Internal name
ai_generative_llm_response_last_message
Category
AI/Generative/Response