fix(core): update

This commit is contained in:
2024-04-25 10:49:07 +02:00
parent 63d3b7c9bb
commit 92c382c16e
12 changed files with 606 additions and 259 deletions

View File

@@ -8,8 +8,22 @@ export abstract class MultiModalModel {
* 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.
abstract chatStream(input: ReadableStream<string>): ReadableStream<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>>;
}