30 lines
629 B
TypeScript
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>>;
|
|
|
|
|
|
}
|