Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

203 B
Raw Blame
import type { JSONValue } from 'ai'

export const toJsonToolOutput = ({ output }: { output: unknown }) => ({
  type: 'json' as const,
  value: JSON.parse(JSON.stringify(output ?? null)) as JSONValue,
})