@imgly/plugin-ai-generation-web
Version:
AI generation plugin for the CE.SDK editor
14 lines (13 loc) • 595 B
TypeScript
import { Output } from '../core/provider';
import { Middleware } from './middleware';
/**
* Middleware to upload the output of a generation process.
*
* Sometimes it is not possible to use the result of a provider or
* not even allowed to use it directly. This middleware allows you to upload
* the result of a generation process to a server or a cloud storage.
*
* @param upload The function to upload the output. It should return a promise
*/
declare function uploadMiddleware<I, O extends Output>(upload: (output: O) => Promise<O>): Middleware<I, O>;
export default uploadMiddleware;