Interface IGenerativeAIWorkerConnector

The generative AI worker connector interface.

interface IGenerativeAIWorkerConnector {
    close(): Promise<void>;
    getEngineType(): GenerativeAIEngineType;
    initialize(workflowId: string, models: Map<string, IGenerativeAIModel>): Promise<void>;
    processJob(parameters: IJobParametersAI, options?: IGenerativeAIWorkerOptions): Promise<IJobResultAI>;
    processJobStream(parameters: IJobParametersAI, options?: IGenerativeAIWorkerOptions): AsyncGenerator<IJobResultAI, any, unknown>;
}

Hierarchy (view full)

Methods

  • Close the machine learning model.

    Returns Promise<void>

    A promise that resolves when the model has been closed.

  • Initialize the machine learning model.

    Parameters

    • workflowId: string

      The workflow ID.

    • models: Map<string, IGenerativeAIModel>

      A map of model IDs and pathnames.

    Returns Promise<void>

    A promise that resolves when the model has been initialized.