A wrapper around get_reply()
to retrieve the most recent assistant reply.
Value
Returns the content of the assistant's reply at the specified index, based on the following conditions:
If there are no assistant replies,
NULL
is returned.If the reply is marked as JSON and parsing is successful, a list containing:
parsed_content
: The parsed JSON content.raw_response
: The original raw content.json
: A flag indicating successful JSON parsing (TRUE
).
If JSON parsing fails, a list containing:
parsed_content
:NULL
.raw_response
: The original raw content.json
:FALSE
.
If
.raw
isTRUE
or the message is not marked as JSON, returns the raw text content directly.