Skip to main content

languagereply-to-json

ai-research-agent / agents/languagereply-to-json

Generate

convertLanguageReplyToJSON()

function convertLanguageReplyToJSON(text, key?): Object[]

This function extracts and cleans content between XML-style tags and returns a JSON object.

Parameters

ParameterTypeDefault valueDescription

text

string

undefined

Input text to parse

key?

string

null

Tag name to look for

Returns

Object[]

Array of objects containing cleaned content items