trpc call that doesn't use prisma
Hi, I need create a trpc endpoint that just calls openAI api. Is it possible to do this in an endpoint with using prisma? What does it look like?
1 Reply
Same core concept; create your endpoint, do the api call, return your data!
For more type-safety, if you know the shape of the data you’re getting you should run it through
zod.safeParse
and return that instead. Typing from my phone, but this should get you started.