@lobehub/chat
Version:
Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.
27 lines (24 loc) • 812 B
text/typescript
/**
* This is your entry point to setup the root configuration for tRPC on the server.
* - `initTRPC` should only be used once per app.
* - We export only the functionality that we use so we can enforce which base procedures should be used
*
* Learn how to create protected base procedures and other things below:
* @link https://trpc.io/docs/v11/router
* @link https://trpc.io/docs/v11/procedures
*/
import { initTRPC } from '@trpc/server';
import superjson from 'superjson';
import type { EdgeContext } from './context';
export const edgeTrpc = initTRPC.context<EdgeContext>().create({
/**
* @link https://trpc.io/docs/v11/error-formatting
*/
errorFormatter({ shape }) {
return shape;
},
/**
* @link https://trpc.io/docs/v11/data-transformers
*/
transformer: superjson,
});