| parse_rag_json | R Documentation |
Parses a JSON string (or list) matching the enforced RAG schema and returns a normalized list: 'list(labels=chr, confidences=num, intensity=num, evidence=data.frame(doc_id, span, score))'.
parse_rag_json(x, validate = TRUE)
x |
JSON string or list. |
validate |
Logical; validate structure after parse. |
A normalized list with atomic vectors and an 'evidence' data.frame.
j <- '{"labels":["joy"],"confidences":[0.9],
"intensity":0.8,"evidence_chunks":[]}'
parse_rag_json(j)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.