-
Notifications
You must be signed in to change notification settings - Fork 367
Expand file tree
/
Copy pathAiAdapter.js
More file actions
32 lines (29 loc) · 919 Bytes
/
AiAdapter.js
File metadata and controls
32 lines (29 loc) · 919 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/**
* IAiAdapter Interface Definition
* Defines the contract that any AI provider must adhere to before being plugged into EmbeddedChat.
*/
export class AiAdapter {
/**
* @param {string} name - The readable name of the AI service (e.g. "Gemini", "Ollama").
*/
constructor(name) {
this.name = name;
this.enabled = true;
}
/**
* Given the context of the room history, suggest auto-replies.
* @param {Array<Object>} messageContext - The last N messages in the room.
* @returns {Promise<Array<string>>} - An array of suggested replies.
*/
async getSmartReplies(messageContext) {
throw new Error('Not implemented');
}
/**
* Summarize the current view for quick catch-up.
* @param {Array<Object>} messages - The raw message payloads.
* @returns {Promise<string>} - The summary text.
*/
async getSummary(messages) {
throw new Error('Not implemented');
}
}