@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.
20 lines (14 loc) • 504 B
text/typescript
import { initTRPC } from '@trpc/server';
import debug from 'debug';
import superjson from 'superjson';
import { AsyncContext } from './context';
const log = debug('lobe-async:init');
log('Initializing async tRPC with context and superjson transformer');
export const asyncTrpc = initTRPC.context<AsyncContext>().create({
errorFormatter({ shape }) {
log('tRPC error formatter called: %O', shape);
return shape;
},
transformer: superjson,
});
log('Async tRPC initialized successfully');