Last active
May 18, 2024 16:16
-
-
Save christopherbauer/bc1aa909871782767e857e1bb79f6d47 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export type Message = { text: string; sent: Date; source: string }; | |
export type Conversation = Message[]; | |
export type ConversationListEntry = { | |
id: string; | |
persona: string; | |
firstMessage: Message; | |
}; | |
export type ConversationList = ConversationListEntry[]; | |
export interface ConversationService { | |
getConversationList: () => Promise<ConversationList>; | |
getConversation: (id: string) => Promise<Conversation>; | |
createConversation: ( | |
id: string, | |
persona: string, | |
initial: Message | |
) => Promise<Conversation>; | |
updateConversation: (id: string, message: Message) => Promise<Conversation>; | |
deleteConversation: (id: string) => Promise<boolean>; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment