DeepResearch / jina-ai /src /lib /async-context.ts
zhengr's picture
init
0bcc252
raw
history blame contribute delete
317 Bytes
import { GlobalAsyncContext } from 'civkit/async-context';
import { container, singleton } from 'tsyringe';
@singleton()
export class AsyncLocalContext extends GlobalAsyncContext {}
const instance = container.resolve(AsyncLocalContext);
Reflect.set(process, 'asyncLocalContext', instance);
export default instance;