@difizen/magent-chat
Version:
43 lines (35 loc) • 1.15 kB
text/typescript
import { singleton } from '@difizen/mana-app';
import type { ChatMessageItemOption } from './chat-message-item-model.js';
import type { ConversationOption, IChatEvent, IChatMessageItem } from './protocol.js';
()
export class ChatService {
chat = async (msg: any): Promise<IChatMessageItem[]> => {
return [];
};
chatStream = async (
msg: any,
messgeCallback: (event: IChatMessageItem) => void,
eventCallback: (event: IChatEvent) => void,
): Promise<void> => {
return undefined;
};
getConversationMessages = async (
conversation: ConversationOption,
): Promise<undefined | ChatMessageItemOption[]> => {
return undefined;
};
getConversations = async (opt: any): Promise<undefined | ConversationOption[]> => {
return undefined;
};
getConversation = async (
opt: ConversationOption,
): Promise<ConversationOption | undefined> => {
return undefined;
};
createConversation = async (opt: any): Promise<ConversationOption | undefined> => {
return undefined;
};
deleteConversation = async (opt: ConversationOption): Promise<boolean> => {
return true;
};
}