Get transcript summaries of Web videos.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

26 regels
806 B

  1. type ProcessEvent = { type: string, phase: string, command?: string };
  2. type ProcessEventCallback = (event: ProcessEvent) => void;
  3. type ErrorEventCallback = (event: Error) => void;
  4. type SuccessEvent = { contentType: string, content: unknown };
  5. type SuccessEventCallback = (event: SuccessEvent) => void;
  6. export interface SummarizerEventEmitter extends NodeJS.EventEmitter {
  7. process(): void;
  8. on(eventType: 'process', callback: ProcessEventCallback): this;
  9. on(eventType: 'error', callback: ErrorEventCallback): this;
  10. on(eventType: 'success', callback: SuccessEventCallback): this;
  11. on(eventType: 'end', callback: () => void): this;
  12. }
  13. export interface CreateBaseSummarizerParams {
  14. url: string;
  15. language?: string;
  16. country?: string;
  17. openaiApiKey: string;
  18. openaiOrganizationId?: string;
  19. }