MCPcopy Create free account
hub / github.com/openai/plugins / parseCodexJsonStream

Function parseCodexJsonStream

plugins/plugin-eval/src/core/benchmark-events.js:156–178  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

154}
155
156export function parseCodexJsonStream(text) {
157 const lines = String(text || "").split(/\r?\n/);
158 const events = [];
159 const ignoredLines = [];
160
161 for (const line of lines) {
162 const trimmed = line.trim();
163 if (!trimmed) {
164 continue;
165 }
166
167 try {
168 events.push(JSON.parse(trimmed));
169 } catch {
170 ignoredLines.push(line);
171 }
172 }
173
174 return {
175 events,
176 ignoredLines,
177 };
178}
179
180export function summarizeCodexEvents(events) {
181 const errorMessages = [];

Callers 2

runBenchmarkFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected