smartai/ts/abstract.classes.multimodal.ts
2024-04-25 10:49:07 +02:00

30 lines
629 B
TypeScript

export abstract class MultiModalModel {
/**
* starts the model
*/
abstract start(): Promise<void>;
/**
* stops the model
*/
abstract stop(): Promise<void>;
public abstract chat(optionsArg: {
systemMessage: string,
userMessage: string,
messageHistory: {
role: 'assistant' | 'user';
content: string;
}[]
}): Promise<{}>
/**
* Defines a streaming interface for chat interactions.
* The implementation will vary based on the specific AI model.
* @param input
*/
public abstract chatStream(input: ReadableStream<string>): Promise<ReadableStream<string>>;
}