|
- type ProcessEvent = { type: string, phase: string, command?: string };
-
- type ProcessEventCallback = (event: ProcessEvent) => void;
-
- type ErrorEventCallback = (event: Error) => void;
-
- type SuccessEvent = { contentType: string, content: unknown };
-
- type SuccessEventCallback = (event: SuccessEvent) => void;
-
- export interface SummarizerEventEmitter extends NodeJS.EventEmitter {
- process(): void;
- on(eventType: 'process', callback: ProcessEventCallback): this;
- on(eventType: 'error', callback: ErrorEventCallback): this;
- on(eventType: 'success', callback: SuccessEventCallback): this;
- on(eventType: 'end', callback: () => void): this;
- }
-
- export interface CreateBaseSummarizerParams {
- url: string;
- language?: string;
- country?: string;
- openaiApiKey: string;
- openaiOrganizationId?: string;
- }
|