Skip to content

Instantly share code, notes, and snippets.

View TheOtherDude's full-sized avatar

Phillip Plummer TheOtherDude

View GitHub Profile
import { z } from "zod";
import { zodToTs, printNode } from "zod-to-ts";
// Replace with your `openai` thing
import { openai } from "../openai.server";
import endent from "endent";
function createJSONCompletion<T extends z.ZodType>({
prompt,
schema_name,