smartai/ts/abstract.classes.multimodal.ts

33 lines
676 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<{
role: 'assistant';
message: string;
}>
/**
* 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>>;
}