UNPKG

@promptbook/langtail

Version:

It's time for a paradigm shift. The future of software in plain English, French or Latin

24 lines (23 loc) 1.42 kB
import type { IDestroyable } from 'destroyable'; import type { RemoteServerOptions } from './interfaces/RemoteServerOptions'; /** * Remote server is a proxy server that uses its execution tools internally and exposes the executor interface externally. * * You can simply use `RemoteExecutionTools` on client-side javascript and connect to your remote server. * This is useful to make all logic on browser side but not expose your API keys or no need to use customer's GPU. * * @see https://github.com/webgptorg/promptbook#remote-server * @public exported from `@promptbook/remote-server` */ export declare function startRemoteServer<TCustomOptions = undefined>(options: RemoteServerOptions<TCustomOptions>): IDestroyable; /** * TODO: Maybe use `$asDeeplyFrozenSerializableJson` * TODO: [🧠][🛍] Maybe not `isAnonymous: boolean` BUT `mode: 'ANONYMOUS'|'COLLECTION'` * TODO: [⚖] Expose the collection to be able to connect to same collection via createCollectionFromUrl * TODO: Handle progress - support streaming * TODO: [🗯] Do not hang up immediately but wait until client closes OR timeout * TODO: [🗯] Timeout on chat to free up resources * TODO: [🃏] Pass here some security token to prevent malitious usage and/or DDoS * TODO: [0] Set unavailable models as undefined in `RemoteLlmExecutionTools` NOT throw error here * TODO: Constrain anonymous mode for specific models / providers */