MCPcopy
hub / github.com/CodebuffAI/codebuff / getRecentRelabels

Function getRecentRelabels

packages/bigquery/src/client.ts:292–308  ·  view source on GitHub ↗
(
  limit: number = 10,
  dataset: string = DATASET,
)

Source from the content-addressed store, hash-verified

290}
291
292export async function getRecentRelabels(
293 limit: number = 10,
294 dataset: string = DATASET,
295) {
296 const query = `
297 SELECT * FROM ${dataset}.${RELABELS_TABLE}
298 ORDER BY created_at DESC
299 LIMIT ${limit}
300 `
301 const [rows] = await getClient().query(query)
302 // Parse the payload as JSON if it's a string
303 return rows.map((row) => ({
304 ...row,
305 payload:
306 typeof row.payload === 'string' ? JSON.parse(row.payload) : row.payload,
307 })) as Relabel[]
308}
309
310export async function getTracesWithoutRelabels(
311 model: string,

Callers 1

printRecentRelabelsFunction · 0.90

Calls 2

getClientFunction · 0.85
parseMethod · 0.80

Tested by

no test coverage detected