File size: 805 Bytes
1944112
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/** @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>>;
    };
};