UNPKG

@convo-lang/convo-lang

Version:
29 lines (28 loc) 1.18 kB
import { VfsCtrl } from "@iyio/vfs"; import { Conversation } from "../Conversation.js"; import { ConvoCompletion } from "../convo-types.js"; import { ConvoWorker } from "./ConvoWorker.js"; export interface ConvoWorkerCtxOptions { basePath?: string; dryRun?: boolean; disableThreadLogging?: boolean; vfs?: VfsCtrl; } export declare class ConvoWorkerCtx { readonly basePath: string; readonly dryRun: boolean; readonly vfs: VfsCtrl; readonly disableThreadLogging: boolean; constructor({ basePath, dryRun, disableThreadLogging, vfs: vfsProp, }: ConvoWorkerCtxOptions); private _isDisposed; get isDisposed(): boolean; dispose(): void; log(...args: any[]): void; createConversationFor(worker?: ConvoWorker): Conversation; writeAsync(path: string, content: Uint8Array | Blob | Blob[] | string): Promise<void>; writeJsonAsync(path: string, value: any): Promise<void>; writeResponse(path: string, response: ConvoCompletion): Promise<void>; readAsync(path: string): Promise<string>; appendAsync(path: string, content: string): Promise<import("@iyio/vfs").VfsItem>; existsAsync(path: string): Promise<boolean>; }