Skip to content

Instantly share code, notes, and snippets.

@christopherbauer
Created May 19, 2024 14:14
Show Gist options
  • Save christopherbauer/1ef44c8b8d73717d33ea8b25dd796108 to your computer and use it in GitHub Desktop.
Save christopherbauer/1ef44c8b8d73717d33ea8b25dd796108 to your computer and use it in GitHub Desktop.
export class ChatGptConversationService {
/* ... */
deleteConversation = (id: string) => {
if (id in ConversationStorage) {
delete ConversationStorage[id];
return Promise.resolve(true);
}
return Promise.resolve(false);
};
/* ... */
}
export class InMemoryConversationService implements ConversationService {
/* ... */
return this.chatgpt.deleteConversation(id);
/* ... */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment