get_reply_data {tidyllm} | R Documentation |
Retrieve Assistant Reply as Structured Data
Description
Parses the assistant's reply as JSON and returns the corresponding structured data. If the reply is not marked as JSON, attempts to extract and parse JSON content from the text.
Usage
get_reply_data(.llm, .index = NULL)
last_reply_data(.llm)
Arguments
.llm |
An |
.index |
A positive integer indicating the index of the assistant reply to retrieve.
Defaults to |
Details
For convenience, last_reply_data()
is provided as a wrapper to retrieve the
latest assistant reply's data.
Value
Returns the parsed data from the assistant's reply, or NULL
if parsing fails.
See Also
get_reply()
, last_reply_data()
[Package tidyllm version 0.3.4 Index]