get_reply: Get Assistant Reply as Text
Description
Retrieves the assistant's reply as plain text from an LLMMessage
object at a specified index.
Usage
get_reply(.llm, .index = NULL)
Value
Plain text content of the assistant's reply, or NA_character_
if no reply is available.
Arguments
- .llm
An LLMMessage
object containing the message history.
- .index
A positive integer for the assistant reply index to retrieve, defaulting to the last reply.