Bernhard
04/13/2026, 2:15 PMMark Murphy
04/13/2026, 2:18 PMBernhard
04/13/2026, 2:18 PMBernhard
04/13/2026, 2:18 PMBernhard
04/13/2026, 2:25 PMBernhard
04/13/2026, 2:25 PMBernhard
04/13/2026, 2:25 PMBernhard
04/13/2026, 2:29 PMMark Murphy
04/13/2026, 2:29 PMwasn't the original purpose to map it onto an object?Yes,
getWeatherForecast does that. It then forwards the structured result to processResult to generate a human-readable forecast from that structured output. Those are linked via edge(getWeatherForecast forwardTo processResult) as part of the overall agent strategy setup.Bernhard
04/13/2026, 2:36 PMMark Murphy
04/13/2026, 2:38 PMJsonStructure.create() call on the next line, to provide examples of properly-structured responses to the LLM. The hope is that these examples will increase the likelihood that the LLM will generate valid and useful JSON.Bernhard
04/13/2026, 2:39 PMforecastStructure
isn't used in the example I thinkBernhard
04/13/2026, 2:40 PMval getWeatherForecast by nodeLLMRequestStructured<WeatherForecast>(
name = "forecast-node",
examples = exampleForecasts,
fixingParser = StructureFixingParser(
model = OpenAIModels.Chat.GPT4o,
retries = 3
)
)
I suppose examples is converted by this call implicitly