nyaaorick's picture
feat: publish everything-webgpu package, engine source and documentation
1944112 verified
Raw History Blame Contribute Delete
805 Bytes
/** @param {import("./engine.js").ScheduledEngine} engine */
export function chatFacade(engine: import("./engine.js").ScheduledEngine): {
completions: {
/**
* @param {import("./engine.js").CompletionRequest & {
* stream?: boolean, stream_options?: {include_usage?: boolean} }} req
* @returns {Promise<object | AsyncIterable<object>>} a completion, or a
* stream of chunks when `stream` is set — the same two shapes WebLLM
* returns, so `await`ing then `for await`ing works unchanged.
*/
create(req: import("./engine.js").CompletionRequest & {
stream?: boolean;
stream_options?: {
include_usage?: boolean;
};
}): Promise<object | AsyncIterable<object>>;
};
};