OutputParser实战智能录入和流式Cursor
两个实战:1)智能录入——用 withStructuredOutput 从无规则文本提取结构化数据,批量插入 MySQL;2)流式版 mini cursor——用 AIMessageChunk.concat() 拼接流式 chunk,JsonOutputToolsParser 增量解析 toolcallchunks,Map 记录已打印长度实现逐字打印效果。withStructuredOutput 底层有三种机制:tool、jsonschema、outputparser,平时直接用 withStructuredOutput 就行。